Uploaded image for project: 'Commons BCEL'
  1. Commons BCEL
  2. BCEL-70

NullPointerException in getLineNumber bei "continue" in for each

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.1
    • 5.2
    • Main
    • None

    Description

      Hi,

      I got a NullPointerException using the FindBugs GUI
      I think BCEL has a problem with "continue" in the new for
      loop. The source code of the problematic file is
      attached as a simplified test case.

      Fataler Fehler während der Analyse:
      java.lang.NullPointerException:
      While finding bugs in class:
      de.his.test.soap.TestSOAPAnnotation
      org.apache.bcel.generic.LineNumberGen.getLineNumber(LineNumberGen.java:72)
      org.apache.bcel.generic.MethodGen.getLineNumberTable(MethodGen.java:474)
      edu.umd.cs.findbugs.SourceLineAnnotation.fromVisitedInstruction(SourceLineAnnotation.java:312)
      edu.umd.cs.findbugs.detect.FindInconsistentSync2$FieldStats.addAccess(FindInconsistentSync2.java:184)
      edu.umd.cs.findbugs.detect.FindInconsistentSync2.analyzeMethod(FindInconsistentSync2.java:532)
      edu.umd.cs.findbugs.detect.FindInconsistentSync2.visitClassContext(FindInconsistentSync2.java:259)
      edu.umd.cs.findbugs.FindBugs.examineClass(FindBugs.java:1598)
      edu.umd.cs.findbugs.FindBugs.executeAnalysisPass(FindBugs.java:1517)
      edu.umd.cs.findbugs.FindBugs.execute(FindBugs.java:1171)
      edu.umd.cs.findbugs.gui.AnalysisRun.execute(AnalysisRun.java:109)
      edu.umd.cs.findbugs.gui.RunAnalysisDialog$1.run(RunAnalysisDialog.java:138)

      Attachments

        1. TestSOAPAnnotation.class
          0.8 kB
          Hendrik Brummermann
        2. TestSOAPAnnotation.java
          0.4 kB
          Hendrik Brummermann

        Activity

          People

            issues@commons.apache.org Apache Commons Developers
            nhb_web@nexgo.de Hendrik Brummermann
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: