[Eclipse plugin] Exceptions and missing line info for inner member classes and for fields
GoogleCodeExporter opened this issue · comments
Google Code Exporter commented
This is a cumulative patch/bug report for 3 issues.
1) AS IS: Bugs which are in inner *member* classes (*named* classes which
are declared inside of method body of another class) leads to
NumberFormatExceptions in FindBugs plugins, so that they are not reported
and not visible in Eclipse at all.
Exemple from Eclipse log:
java.lang.NumberFormatException: For input string: "1MyRunnable"
at java.lang.NumberFormatException.forInputString(NumberFormatException.jav
a:48)
at java.lang.Integer.parseInt(Integer.java:456)
at java.lang.Integer.parseInt(Integer.java:497)
at de.tobject.findbugs.reporter.MarkerUtil.findChildSourceLine(MarkerUtil.j
ava:249)
at de.tobject.findbugs.reporter.MarkerUtil.completeInnerClassInfo(MarkerUti
l.java:195)
at de.tobject.findbugs.reporter.MarkerUtil.getUnderlyingResource(MarkerUtil
.java:176)
at de.tobject.findbugs.reporter.MarkerUtil.createMarker(MarkerUtil.java:93)
at de.tobject.findbugs.reporter.Reporter.doReportBug(Reporter.java:111)
TO BE: no exception, bug is propely reported
2) AS IS: Bug markers which are in inner classes are not always shown in
editor, because FindBugs plugin may use -1 as a source location (if the
line was not reported in the bug), so that Eclipse shows the bug in the
Problems view but not in the editor (editor lines starts with 1).
TO BE: bug is propely reported in editor too
3) AS IS: Bug markers for fields which shown in the Problems view are
never at the right location in the editor, because this info is not
available in the bug instance.
TO BE: bug is propely reported in editor too
Seen with the latest FindBugs from SVN with Eclipse 3.2.2 and JDK 1.5
Please use the patch attached below to fix all three problems.
Original issue reported on code.google.com by andya...@nurfuerspam.de
on 30 Oct 2006 at 10:24
Attachments:
Google Code Exporter commented
committed your patch to SVN, with one change to avoid a NullPointerException
Original comment by bassc...@gmail.com
on 17 Nov 2006 at 10:24
- Changed state: Fixed