This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 152088 - NullPointerException at com.sun.tools.javac.comp.Flow.visitForeachLoop
Summary: NullPointerException at com.sun.tools.javac.comp.Flow.visitForeachLoop
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Compiler (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Dusan Balek
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks: 152191
  Show dependency tree
 
Reported: 2008-11-01 13:50 UTC by Jan Lahoda
Modified: 2009-05-13 20:36 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 134947


Attachments
stacktrace (2.94 KB, text/plain)
2008-11-01 13:50 UTC, Jan Lahoda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Lahoda 2008-11-01 13:50:52 UTC
Build: NetBeans IDE Dev (Build 081028)
VM: Java HotSpot(TM) Client VM, 11.0-b11, Java(TM) SE Runtime Environment, 1.6.0_10-beta-b14
OS: Linux, 2.6.24-19-generic, i386

User Comments:
jlahoda: Caused by:
    public void test() {
        java.util.List<String> l = null;

        for (String s : !l.isEmpty()) {}
    }



Stacktrace: 
java.lang.NullPointerException
        at com.sun.tools.javac.comp.Flow.visitForeachLoop(Flow.java:868)
        at com.sun.tools.javac.tree.JCTree$JCEnhancedForLoop.accept(JCTree.java:895)
        at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
        at com.sun.tools.javac.comp.Flow.scanStat(Flow.java:499)
        at com.sun.tools.javac.comp.Flow.scanStats(Flow.java:507)
        at com.sun.tools.javac.comp.Flow.visitBlock(Flow.java:758)
Comment 1 Jan Lahoda 2008-11-01 13:50:56 UTC
Created attachment 73044 [details]
stacktrace
Comment 2 Dusan Balek 2008-11-03 12:59:25 UTC
Fixed.

changeset 05c0c782b976 in main/nb-javac
details: http://hg.netbeans.org/main/nb-javac?cmd=changeset;node=05c0c782b976
changeset 910a07b8a6c0 in main
details: http://hg.netbeans.org/main?cmd=changeset;node=910a07b8a6c0
Comment 3 Quality Engineering 2008-11-04 16:26:37 UTC
Integrated into 'main-golden', will be available in build *200811041401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/910a07b8a6c0
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #152088: NullPointerException at com.sun.tools.javac.comp.Flow.visitForeachLoop - fixed.