Removed unused options.

This commit is contained in:
Oliver Burn 2002-10-13 12:46:33 +00:00
parent 1bba9f0056
commit 8083866f72
7 changed files with 4 additions and 62 deletions

View File

@ -27,7 +27,7 @@ import java.util.HashMap;
* Represents the options for placing the left curly brace '{'.
*
* @author <a href="mailto:oliver@puppycrawl.com">Oliver Burn</a>
* @version $Id: LeftCurlyOption.java,v 1.6 2002-06-06 11:45:40 oburn Exp $
* @version $Id: LeftCurlyOption.java,v 1.7 2002-10-13 12:46:33 oburn Exp $
*/
public final class LeftCurlyOption implements Serializable
{
@ -36,8 +36,6 @@ public final class LeftCurlyOption implements Serializable
/** represents placing the brace at the end of line **/
public static final LeftCurlyOption EOL = new LeftCurlyOption("eol");
/** represents ignoring the placement **/
public static final LeftCurlyOption IGNORE = new LeftCurlyOption("ignore");
/**
* represents placing on the end of the line if it fits on the first line,
* otherwise placing on a new line.

View File

@ -42,9 +42,8 @@ public abstract class LeftCurlyCheck extends Check
getLines()[aBrace.getLineNo() - 2]);
// Check for being told to ignore, or have '{}' which is a special case
if ((mOption == LeftCurlyOption.IGNORE)
|| ((braceLine.length() > (aBrace.getColumnNo() + 1))
&& (braceLine.charAt(aBrace.getColumnNo() + 1) == '}')))
if ((braceLine.length() > (aBrace.getColumnNo() + 1))
&& (braceLine.charAt(aBrace.getColumnNo() + 1) == '}'))
{
// ignore
}

View File

@ -27,7 +27,7 @@ import java.util.HashMap;
* Represents the options for placing the right curly brace '}'.
*
* @author <a href="mailto:oliver@puppycrawl.com">Oliver Burn</a>
* @version $Id: RightCurlyOption.java,v 1.1 2002-10-07 09:17:15 oburn Exp $
* @version $Id: RightCurlyOption.java,v 1.2 2002-10-13 12:46:33 oburn Exp $
*/
public final class RightCurlyOption implements Serializable
{
@ -38,9 +38,6 @@ public final class RightCurlyOption implements Serializable
public static final RightCurlyOption ALONE = new RightCurlyOption("alone");
/** represents placing the brace on the same line **/
public static final RightCurlyOption SAME = new RightCurlyOption("same");
/** represents ignoring the placement **/
public static final RightCurlyOption IGNORE =
new RightCurlyOption("ignore");
/** the string representation of the option **/
private final String mStrRep;

View File

@ -25,19 +25,6 @@ public class MethodLeftCurlyCheckTest
verify(c, fname, expected);
}
public void testIgnore()
throws Exception
{
final CheckConfiguration checkConfig = new CheckConfiguration();
checkConfig.setClassname(MethodLeftCurlyCheck.class.getName());
checkConfig.addProperty("option", LeftCurlyOption.IGNORE.toString());
final Checker c = createChecker(checkConfig);
final String fname = getPath("InputLeftCurlyMethod.java");
final String[] expected = {
};
verify(c, fname, expected);
}
public void testNL()
throws Exception
{

View File

@ -45,17 +45,4 @@ public class OtherLeftCurlyCheckTest
};
verify(c, fname, expected);
}
public void testIgnore()
throws Exception
{
final CheckConfiguration checkConfig = new CheckConfiguration();
checkConfig.setClassname(OtherLeftCurlyCheck.class.getName());
checkConfig.addProperty("option", LeftCurlyOption.IGNORE.toString());
final Checker c = createChecker(checkConfig);
final String fname = getPath("InputLeftCurlyOther.java");
final String[] expected = {
};
verify(c, fname, expected);
}
}

View File

@ -56,17 +56,4 @@ public class RightCurlyCheckTest
};
verify(c, fname, expected);
}
public void testIgnore()
throws Exception
{
final CheckConfiguration checkConfig = new CheckConfiguration();
checkConfig.setClassname(RightCurlyCheck.class.getName());
checkConfig.addProperty("option", RightCurlyOption.IGNORE.toString());
final Checker c = createChecker(checkConfig);
final String fname = getPath("InputLeftCurlyOther.java");
final String[] expected = {
};
verify(c, fname, expected);
}
}

View File

@ -57,17 +57,4 @@ public class TypeLeftCurlyCheckTest
};
verify(c, fname, expected);
}
public void testIgnore()
throws Exception
{
final CheckConfiguration checkConfig = new CheckConfiguration();
checkConfig.setClassname(TypeLeftCurlyCheck.class.getName());
checkConfig.addProperty("option", LeftCurlyOption.IGNORE.toString());
final Checker c = createChecker(checkConfig);
final String fname = getPath("InputScopeInnerInterfaces.java");
final String[] expected = {
};
verify(c, fname, expected);
}
}