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.
Summary: | NullPointerException at com.sun.tools.javac.comp.Attr.visitTry | ||
---|---|---|---|
Product: | java | Reporter: | thiagofcf <thiagofcf> |
Component: | Compiler | Assignee: | Dusan Balek <dbalek> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | alexlamsl, davidvc, jasnapaka, mpetras, oj-nb, sandun1234u, sreimers, tveimo |
Priority: | P2 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://statistics.netbeans.org/exceptions/detail.do?id=132001 | ||
Issue Type: | DEFECT | Exception Reporter: | 132001 |
Attachments: |
stacktrace
stacktrace stacktrace |
Description
thiagofcf
2008-11-21 19:28:34 UTC
Created attachment 74025 [details]
stacktrace
Reassigning to java. As can be seen form the attach stack trace - exception was thrown while expanding some code template. Do you remember which one it was? Is the issue reproducible? Thanks. Build: NetBeans IDE Dev (Build 200901080201) VM: Java HotSpot(TM) 64-Bit Server VM, 11.0-b16, Java(TM) SE Runtime Environment, 1.6.0_11-b03 OS: Linux, 2.6.27.9-159.fc10.x86_64, amd64 User Comments: Stacktrace: java.lang.NullPointerException at com.sun.tools.javac.comp.Attr.visitTry(Attr.java:974) at com.sun.tools.javac.tree.JCTree$JCTry.accept(JCTree.java:1027) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:391) at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:428) at com.sun.tools.javac.comp.Attr.attribStats(Attr.java:444) at com.sun.tools.javac.comp.Attr.visitBlock(Attr.java:798) Created attachment 75634 [details]
stacktrace
Build: NetBeans IDE Dev (Build 200902090201) VM: Java HotSpot(TM) Server VM, 11.0-b16, Java(TM) SE Runtime Environment, 1.6.0_11-b03 OS: Windows Vista, 6.0, x86 User Comments: Editing code - removal of if-statement condition line, which causes a (temporary) inbalance in braces Stacktrace: java.lang.NullPointerException at com.sun.tools.javac.comp.Attr.visitTry(Attr.java:975) at com.sun.tools.javac.tree.JCTree$JCTry.accept(JCTree.java:1027) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:391) at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:428) at com.sun.tools.javac.comp.Attr.attribStats(Attr.java:444) at com.sun.tools.javac.comp.Attr.visitBlock(Attr.java:798) Created attachment 76761 [details]
stacktrace
I wasn't expanding any code templates, I was removing the first 4 lines of the following code: // Use getPackage() instead of property because property can fail on security check Package sysPackage = Runtime.getRuntime().getClass().getPackage(); String sysVer = sysPackage.getSpecificationVersion(); if (sysVer.startsWith("1.5")) { new JLabel(); } Before I can get to then remove the bottom line as well, I got stopped by this NPE. Fixed in jet-main. http://hg.netbeans.org/jet-main/rev/da9eb37ee0df changeset f794f979a382 in main/nb-javac details: http://hg.netbeans.org/main/nb-javac?cmd=changeset;node=f794f979a382 Integrated into 'main-golden', will be available in build *200905070201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/da9eb37ee0df User: Dusan Balek <dbalek@netbeans.org> Log: Issues #146205, #153664, #161870, #161915, #162097, #162302, #162451, #163931, and #163989 fixed. |