[Fb-contrib-commit] SF.net SVN: fb-contrib: [878] trunk/fb-contrib/src/com/mebigfatguy/ fbcontrib/
Brought to you by:
dbrosius
From: <dbr...@us...> - 2007-03-11 15:06:36
|
Revision: 878 http://svn.sourceforge.net/fb-contrib/?rev=878&view=rev Author: dbrosius Date: 2007-03-11 08:06:35 -0700 (Sun, 11 Mar 2007) Log Message: ----------- no need to check new against null Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SuspiciousJDKVersionUse.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SuspiciousJDKVersionUse.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SuspiciousJDKVersionUse.java 2007-03-11 14:31:03 UTC (rev 877) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/SuspiciousJDKVersionUse.java 2007-03-11 15:06:35 UTC (rev 878) @@ -187,24 +187,18 @@ ZipEntry ze = jdkZip.getEntry(clsName + ".class"); if (ze != null) { is = new BufferedInputStream(jdkZip.getInputStream(ze)); - if (is != null) { - ClassParser parser = new ClassParser(is, clsName); - JavaClass calledClass = parser.parse(); - - superNames.put(clsName, calledClass.getSuperclassName().replace('.', '/')); - Method[] methods = calledClass.getMethods(); - - methodInfos = new HashSet<String>(); - validMethods.put(clsName, methodInfos); - - for (Method m : methods) { - methodInfos.add(m.getName() + m.getSignature()); - } - + ClassParser parser = new ClassParser(is, clsName); + JavaClass calledClass = parser.parse(); + + superNames.put(clsName, calledClass.getSuperclassName().replace('.', '/')); + Method[] methods = calledClass.getMethods(); + + methodInfos = new HashSet<String>(); + validMethods.put(clsName, methodInfos); + + for (Method m : methods) { + methodInfos.add(m.getName() + m.getSignature()); } - else { - return true; - } } else if (clsName.startsWith("java/")) { bugReporter.reportBug(new BugInstance(this, "SJVU_SUSPICIOUS_JDK_VERSION_USE", HIGH_PRIORITY) .addClass(this) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |