[Fb-contrib-commit] SF.net SVN: fb-contrib: [747] trunk/fb-contrib/src/com/mebigfatguy/ fbcontrib/
Brought to you by:
dbrosius
From: <dbr...@us...> - 2006-12-22 04:18:46
|
Revision: 747 http://svn.sourceforge.net/fb-contrib/?rev=747&view=rev Author: dbrosius Date: 2006-12-21 20:18:42 -0800 (Thu, 21 Dec 2006) Log Message: ----------- if the implementing class is not an application class, report SCII as low Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SpoiledChildInterfaceImplementor.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SpoiledChildInterfaceImplementor.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SpoiledChildInterfaceImplementor.java 2006-12-21 09:12:31 UTC (rev 746) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SpoiledChildInterfaceImplementor.java 2006-12-22 04:18:42 UTC (rev 747) @@ -27,6 +27,7 @@ import edu.umd.cs.findbugs.BugInstance; import edu.umd.cs.findbugs.BugReporter; import edu.umd.cs.findbugs.Detector; +import edu.umd.cs.findbugs.ba.AnalysisContext; import edu.umd.cs.findbugs.ba.ClassContext; /** @@ -69,8 +70,10 @@ if (infMethods.size() > 0) { infMethods.removeAll(clsMethods); if (infMethods.size() > 0) { - if (!cls.getSuperClass().implementationOf(inf)) { - BugInstance bi = new BugInstance(this, "SCII_SPOILED_CHILD_INTERFACE_IMPLEMENTATOR", NORMAL_PRIORITY) + JavaClass superCls = cls.getSuperClass(); + if (!superCls.implementationOf(inf)) { + int priority = AnalysisContext.currentAnalysisContext().getSubtypes().isApplicationClass(superCls) ? NORMAL_PRIORITY : LOW_PRIORITY; + BugInstance bi = new BugInstance(this, "SCII_SPOILED_CHILD_INTERFACE_IMPLEMENTATOR", priority) .addClass(cls) .addString("Implementing interface: " + inf.getClassName()) .addString("Methods:"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |