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 235791 - NullPointerException at com.sun.tools.javac.comp.Lower.visitApply
Summary: NullPointerException at com.sun.tools.javac.comp.Lower.visitApply
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Compiler (show other bugs)
Version: 7.4
Hardware: All All
: P2 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-11 08:59 UTC by tomzi
Modified: 2015-04-23 02:11 UTC (History)
17 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 203767


Attachments
stacktrace (5.15 KB, text/plain)
2013-09-11 08:59 UTC, tomzi
Details
stacktrace (5.15 KB, text/plain)
2013-11-18 19:30 UTC, javydreamercsw
Details
stacktrace (5.08 KB, text/plain)
2013-12-09 05:48 UTC, Exceptions Reporter
Details
stacktrace (5.08 KB, text/plain)
2014-02-11 20:16 UTC, _ tboudreau
Details
stacktrace (5.08 KB, text/plain)
2014-04-05 01:34 UTC, misterm
Details
stacktrace (5.08 KB, text/plain)
2014-04-05 01:37 UTC, misterm
Details
stacktrace (5.08 KB, text/plain)
2014-04-05 22:07 UTC, Vladimir Voskresensky
Details
stacktrace (5.08 KB, text/plain)
2014-05-07 06:27 UTC, Vladimir Voskresensky
Details
stacktrace (5.07 KB, text/plain)
2014-08-28 20:20 UTC, Michel Graciano
Details
stacktrace (5.08 KB, text/plain)
2015-04-06 23:27 UTC, Michel Graciano
Details
stacktrace (5.08 KB, text/plain)
2015-04-07 22:03 UTC, Michel Graciano
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tomzi 2013-09-11 08:59:57 UTC
This bug was originally marked as duplicate of bug 159166, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE Dev (Build 201309100337)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.25-b01, Java(TM) SE Runtime Environment, 1.7.0_25-b15
OS: Linux

User Comments:
tomzi: .

tomzi: .

tomzi: .




Stacktrace: 
java.lang.NullPointerException
   at com.sun.tools.javac.comp.Lower.visitApply(Lower.java:2975)
   at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1465)
   at com.sun.tools.javac.tree.TreeTranslator.translate(TreeTranslator.java:58)
   at com.sun.tools.javac.comp.Lower.translate(Lower.java:2296)
   at com.sun.tools.javac.tree.TreeTranslator.visitExec(TreeTranslator.java:245)
   at com.sun.tools.javac.tree.JCTree$JCExpressionStatement.accept(JCTree.java:1296)
Comment 1 tomzi 2013-09-11 08:59:59 UTC
Created attachment 139920 [details]
stacktrace
Comment 2 Exceptions Reporter 2013-11-14 10:21:35 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=203767
Comment 3 javydreamercsw 2013-11-18 19:30:49 UTC
Created attachment 142328 [details]
stacktrace

Saving a file.
Comment 4 Exceptions Reporter 2013-12-09 05:48:40 UTC
Created attachment 142952 [details]
stacktrace

<Forne?a uma descri??o do problema ou as etapas a serem reproduzidas>.
Comment 5 _ tboudreau 2014-02-11 20:16:26 UTC
Created attachment 145056 [details]
stacktrace

Doing a large git merge on the command-line
Comment 6 misterm 2014-04-05 01:34:30 UTC
Created attachment 146563 [details]
stacktrace

Deleting code
Comment 7 misterm 2014-04-05 01:37:30 UTC
Created attachment 146564 [details]
stacktrace

Fixing imports
Comment 8 Vladimir Voskresensky 2014-04-05 22:07:37 UTC
Created attachment 146574 [details]
stacktrace

recreate java file externally. File has non compilable code
Comment 9 Vladimir Voskresensky 2014-05-07 06:27:48 UTC
Created attachment 147155 [details]
stacktrace

opened java file with compiler error
Comment 10 Michel Graciano 2014-08-28 20:20:02 UTC
Created attachment 148946 [details]
stacktrace

Saving a java class file
Comment 11 Michel Graciano 2015-04-06 23:27:17 UTC
Created attachment 153067 [details]
stacktrace

Saved a uncompilable enum
Comment 12 Exceptions Reporter 2015-04-06 23:27:23 UTC
This bug already has 50 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=203767
Comment 13 Dusan Balek 2015-04-07 09:02:58 UTC
Do you have a reproducible test case?
Comment 14 Michel Graciano 2015-04-07 22:03:26 UTC
Created attachment 153086 [details]
stacktrace

Editing an invalid enum
Comment 15 Michel Graciano 2015-04-07 22:11:51 UTC
(In reply to Dusan Balek from comment #13)
> Do you have a reproducible test case?

Yes, I tried it again today and finally reproduced it as follow:

public enum SampleEnum {

    VALUE_1("1", VALUE_2),
    VALUE_2("2", VALUE_1);
    private final String value;
    private final SampleEnum e;

    private SampleEnum(final String value) {
        this.value = value;
        this.e = sampleEnum;
    }

    public abstract SampleEnum getSampleEnum()

    public String getValue() {
        return value;
    }

}

I hope it helps. The issue happened after I removed "final SampleEnum sampleEnum" as constructor parameter.
Comment 17 cezariusz 2015-04-22 07:55:23 UTC
The second link I believe should be:
http://hg.netbeans.org/main/nb-javac/rev/adb99a8dd2fb
Comment 18 Quality Engineering 2015-04-23 02:11:29 UTC
Integrated into 'main-silver', will be available in build *201504230001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/bcaa68246bf8
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #235791: NullPointerException at com.sun.tools.javac.comp.Lower.visitApply - fixed.