removed redundant modifier checks from old code

This commit is contained in:
Lars Kühne 2002-09-29 14:16:38 +00:00
parent 021d6344b6
commit 553a1aec9f
4 changed files with 0 additions and 27 deletions

View File

@ -539,12 +539,6 @@ public class Configuration
return getBooleanProperty(Defn.IGNORE_BRACES_PROP);
}
/** @return whether to ignore 'public' keyword in interface definitions **/
boolean isIgnorePublicInInterface()
{
return getBooleanProperty(Defn.IGNORE_PUBLIC_IN_INTERFACE_PROP);
}
/** @return whether to ignore max line length for import statements **/
boolean isIgnoreImportLength()
{

View File

@ -78,9 +78,6 @@ public interface Defn
String IGNORE_CAST_WHITESPACE_PROP = "checkstyle.ignore.whitespace.cast";
/** property name for ignoring braces **/
String IGNORE_BRACES_PROP = "checkstyle.ignore.braces";
/** property name for ignoring 'public' in interface definitions **/
String IGNORE_PUBLIC_IN_INTERFACE_PROP =
"checkstyle.ignore.public.in.interface";
/** property name for cache file **/
String CACHE_FILE_PROP = "checkstyle.cache.file";
/** property name for ignoring line length of import statements **/
@ -122,7 +119,6 @@ public interface Defn
IGNORE_BRACES_PROP,
IGNORE_CAST_WHITESPACE_PROP,
IGNORE_IMPORT_LENGTH_PROP,
IGNORE_PUBLIC_IN_INTERFACE_PROP,
IGNORE_WHITESPACE_PROP,
JAVADOC_CHECK_UNUSED_THROWS_PROP,
REQUIRE_PACKAGE_HTML_PROP,

View File

@ -238,21 +238,7 @@ class Verifier
aSig.getFirstColNo(),
"maxParam", new Integer(mConfig.getMaxParameters()));
}
// JLS, chapter 9.4 - public in interface is strongly discouraged
if (!mConfig.isIgnorePublicInInterface() && inInterfaceBlock()
&& aSig.getModSet().containsPublic())
{
mMessages.add(aSig.getModSet().getFirstLineNo(),
aSig.getModSet().getFirstColNo(),
"redundantModifier", "public");
}
// Check for redunant abstract
if (inInterfaceBlock() && aSig.getModSet().containsAbstract()) {
mMessages.add(aSig.getModSet().getFirstLineNo(),
aSig.getModSet().getFirstColNo(),
"redundantModifier", "abstract");
}
// now check the javadoc
final Scope methodScope = inInterfaceBlock()
? Scope.PUBLIC

View File

@ -522,8 +522,6 @@ public class CheckerTest
filepath + ":14:10: 'final' modifier out of order with the JLS suggestions.",
filepath + ":18:12: 'private' modifier out of order with the JLS suggestions.",
filepath + ":24:14: 'private' modifier out of order with the JLS suggestions.",
filepath + ":32:9: Redundant 'public' modifier.",
filepath + ":38:9: Redundant 'abstract' modifier.",
};
verify(c, filepath, expected);
}
@ -614,7 +612,6 @@ public class CheckerTest
throws Exception
{
mProps.setProperty(Defn.JAVADOC_CHECKSCOPE_PROP, Scope.PUBLIC.getName());
mProps.setProperty(Defn.IGNORE_PUBLIC_IN_INTERFACE_PROP, "true");
final Checker c = createChecker();
final String filepath = getPath("InputScopeInnerInterfaces.java");
assertNotNull(c);