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 258579 - NullPointerException at org.netbeans.modules.refactoring.java.plugins.TreeDuplicator.duplicate
Summary: NullPointerException at org.netbeans.modules.refactoring.java.plugins.TreeDup...
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 8.2
Hardware: All All
: P3 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-29 19:44 UTC by Jesse Glick
Modified: 2016-05-18 01:47 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 223245


Attachments
stacktrace (11.42 KB, text/plain)
2016-03-29 19:44 UTC, Jesse Glick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2016-03-29 19:44:52 UTC
Build: NetBeans IDE Dev (Build 20151104-5022c03c8164)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.74-b02, Java(TM) SE Runtime Environment, 1.8.0_74-b02
OS: Linux

User Comments:
jglick: Tried to inline a method with an empty body (one I had just deleted). Expected that to have the effect of deleting the method and its call points. Instead threw an NPE.




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.refactoring.java.plugins.TreeDuplicator.duplicate(TreeDuplicator.java:114)
   at org.netbeans.modules.refactoring.java.plugins.InlineMethodTransformer.translateLastStatement(InlineMethodTransformer.java:878)
   at org.netbeans.modules.refactoring.java.plugins.InlineMethodTransformer.visitMethodInvocation(InlineMethodTransformer.java:341)
   at org.netbeans.modules.refactoring.java.plugins.InlineMethodTransformer.visitMethodInvocation(InlineMethodTransformer.java:68)
   at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1483)
   at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:68)
Comment 1 Jesse Glick 2016-03-29 19:44:54 UTC
Created attachment 159040 [details]
stacktrace
Comment 2 Ralph Ruijs 2016-05-17 14:00:10 UTC
changeset:   600bc44e0a36
user:        Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
date:        Tue May 17 15:58:29 2016 +0200
summary:     #258579 - remove invocation when inline empty method
Comment 3 Quality Engineering 2016-05-18 01:47:59 UTC
Integrated into 'main-silver', will be available in build *201605180002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/600bc44e0a36
User: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
Log: #258579 - remove invocation when inline empty method