[Clirr-devel] CVS: clirr/src/java/net/sf/clirr/checks MethodSetCheck.java,1.13,1.14
Status: Alpha
Brought to you by:
lkuehne
From: Simon K. <s_k...@us...> - 2004-06-28 05:58:23
|
Update of /cvsroot/clirr/clirr/src/java/net/sf/clirr/checks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27733 Modified Files: MethodSetCheck.java Log Message: Rewrite reportMethodAdded method; should be no logic change, just minor change to report message. Index: MethodSetCheck.java =================================================================== RCS file: /cvsroot/clirr/clirr/src/java/net/sf/clirr/checks/MethodSetCheck.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- MethodSetCheck.java 23 Jun 2004 04:57:43 -0000 1.13 +++ MethodSetCheck.java 28 Jun 2004 05:58:13 -0000 1.14 @@ -422,15 +422,27 @@ */ private void reportMethodAdded(JavaClass newClass, Method newMethod) { - - final Severity severity = !newClass.isInterface() && (newClass.isFinal() || !newMethod.isAbstract()) - ? Severity.INFO - : Severity.ERROR; - - fireDiff("Method '" - + getMethodId(newClass, newMethod) - + "' has been added", - severity, newClass, newMethod); + if (newClass.isInterface()) + { + fireDiff("Method '" + + getMethodId(newClass, newMethod) + + "' has been added to an interface", + Severity.ERROR, newClass, newMethod); + } + else if (newMethod.isAbstract()) + { + fireDiff("Abstract method '" + + getMethodId(newClass, newMethod) + + "' has been added", + Severity.ERROR, newClass, newMethod); + } + else + { + fireDiff("Method '" + + getMethodId(newClass, newMethod) + + "' has been added", + Severity.INFO, newClass, newMethod); + } } /** |