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 182182 - Safe variable and function removing throws NPE at org.openide.util.lookup.InstanceContent$SimpleItem.<init>
Summary: Safe variable and function removing throws NPE at org.openide.util.lookup.Ins...
Status: VERIFIED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 6.x
Hardware: All All
: P2 normal (vote)
Assignee: J Bachorik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-17 09:00 UTC by Exceptions Reporter
Modified: 2010-03-19 12:14 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 166548


Attachments
stacktrace (1.09 KB, text/plain)
2010-03-17 09:01 UTC, Exceptions Reporter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Exceptions Reporter 2010-03-17 09:00:58 UTC
Build: NetBeans IDE Dev (Build 201003160201)
VM: Java HotSpot(TM) Client VM, 14.1-b02, Java(TM) SE Runtime Environment, 1.6.0_15-b03
OS: Windows XP

Stacktrace: 
java.lang.NullPointerException
   at org.openide.util.lookup.InstanceContent$SimpleItem.<init>(InstanceContent.java:195)
   at org.openide.util.lookup.SimpleLookup.<init>(SimpleLookup.java:69)
   at org.openide.util.lookup.Lookups.fixed(Lookups.java:108)
   at org.netbeans.modules.javafx.refactoring.impl.plugins.SafeDeleteRefactoringPlugin.createQuery(SafeDeleteRefactoringPlugin.java:269)
   at org.netbeans.modules.javafx.refactoring.impl.plugins.SafeDeleteRefactoringPlugin.checkParameters(SafeDeleteRefactoringPlugin.java:131)
   at org.netbeans.modules.refactoring.api.AbstractRefactoring.pluginsCheckParams(AbstractRefactoring.java:483)
Comment 1 Exceptions Reporter 2010-03-17 09:01:04 UTC
Created attachment 95272 [details]
stacktrace
Comment 2 Alexandr Scherbatiy 2010-03-17 09:04:51 UTC
NetBeans-JavaFX-Soma:  #188

Steps to reproduce:

- Copy the code to the editor:
-------------------------------------
var a = 10;
var b = a + 10;
-------------------------------------

- Select the 'b' variable
- Invoke Refactor->Safely Delete 
- Press Refactor on the dialog 

The NPE pops up.
Comment 3 Alexandr Scherbatiy 2010-03-17 09:06:31 UTC
The same is if safely delete the 'f' function from the code:
-------------------------------------- 
class A{
    public function f() {
    }
}
--------------------------------------
Comment 4 Alexandr Scherbatiy 2010-03-17 09:07:17 UTC
The same is if safely delete the 'A' class from the file:
------------- Main.fx  ----------------- 
class A{
    public function f() {
    }
}
--------------------------------------
Comment 5 J Bachorik 2010-03-18 14:58:30 UTC
fixed in - http://hg.netbeans.org/javafx/rev/361e46a0bbc7
Comment 6 Alexandr Scherbatiy 2010-03-19 12:14:17 UTC
verified in NetBeans-JavaFX-Soma: #190