Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/checks
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9259
Modified Files:
ClassModifierCheck.java
Log Message:
Use new getSeverity method to suppress ERRORs for package & private diffs.
Also wrapped some overly-long lines.
Index: ClassModifierCheck.java
===================================================================
RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/checks/ClassModifierCheck.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ClassModifierCheck.java 11 Jul 2004 10:33:50 -0000 1.2
+++ ClassModifierCheck.java 16 Jul 2004 09:58:25 -0000 1.3
@@ -35,7 +35,9 @@
*
* @author lkuehne
*/
-public final class ClassModifierCheck extends AbstractDiffReporter implements ClassChangeCheck
+public final class ClassModifierCheck
+ extends AbstractDiffReporter
+ implements ClassChangeCheck
{
private static final Message MSG_MODIFIER_UNABLE_TO_DETERMINE_CLASS_SCOPE = new Message(3000);
private static final Message MSG_MODIFIER_REMOVED_FINAL = new Message(3001);
@@ -70,7 +72,8 @@
}
catch (CheckerException ex)
{
- log(MSG_MODIFIER_UNABLE_TO_DETERMINE_CLASS_SCOPE, Severity.ERROR, className, null, null, null);
+ log(MSG_MODIFIER_UNABLE_TO_DETERMINE_CLASS_SCOPE,
+ Severity.ERROR, className, null, null, null);
return true;
}
@@ -83,28 +86,35 @@
if (compatIsFinal && !currentIsFinal)
{
- log(MSG_MODIFIER_REMOVED_FINAL, Severity.INFO, className, null, null, null);
+ log(MSG_MODIFIER_REMOVED_FINAL,
+ Severity.INFO, className, null, null, null);
}
else if (!compatIsFinal && currentIsFinal)
{
if (isEffectivelyFinal(compatBaseLine))
{
- log(MSG_MODIFIER_ADDED_FINAL_TO_EFFECTIVE_FINAL, Severity.INFO, className, null, null, null);
+ log(MSG_MODIFIER_ADDED_FINAL_TO_EFFECTIVE_FINAL,
+ Severity.INFO, className, null, null, null);
}
else
{
- log(MSG_MODIFIER_ADDED_FINAL, Severity.ERROR, className, null, null, null);
+ log(MSG_MODIFIER_ADDED_FINAL,
+ getSeverity(compatBaseLine, Severity.ERROR),
+ className, null, null, null);
}
}
// interfaces are always abstract, don't report gender change here
if (compatIsAbstract && !currentIsAbstract && !compatIsInterface)
{
- log(MSG_MODIFIER_REMOVED_ABSTRACT, Severity.INFO, className, null, null, null);
+ log(MSG_MODIFIER_REMOVED_ABSTRACT,
+ Severity.INFO, className, null, null, null);
}
else if (!compatIsAbstract && currentIsAbstract && !currentIsInterface)
{
- log(MSG_MODIFIER_ADDED_ABSTRACT, Severity.ERROR, className, null, null, null);
+ log(MSG_MODIFIER_ADDED_ABSTRACT,
+ getSeverity(compatBaseLine, Severity.ERROR),
+ className, null, null, null);
}
return true;
|