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 135290 - NullPointerException at org.netbeans.modules.refactoring.javascript.RetoucheUtils.getClasspathInfoFor
Summary: NullPointerException at org.netbeans.modules.refactoring.javascript.RetoucheU...
Status: RESOLVED DUPLICATE of bug 136936
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Torbjorn Norbye
URL: http://statistics.netbeans.org/except...
Keywords:
: 138314 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-05-19 07:01 UTC by unr303
Modified: 2009-02-27 14:26 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 36233


Attachments
ide log (68.12 KB, text/plain)
2008-05-19 07:01 UTC, unr303
Details
ide log (63.28 KB, text/plain)
2008-05-20 06:54 UTC, unr303
Details

Note You need to log in before you can comment on or make changes to this bug.
Description unr303 2008-05-19 07:01:29 UTC
new js file containing
function b(){
    var c = 1;
    var n = c;    
}
refactor/rename c -> exception


Build: NetBeans IDE 6.1 Beta  Build 200803050202 
VM: Java HotSpot TM  Client VM, 10.0-b19
OS: Windows XP, 5.1, x86
User comments: 
STACKTRACE:  first 10 lines 
java.lang.NullPointerException
        at org.netbeans.modules.refactoring.javascript.RetoucheUtils.getClasspathInfoFor RetoucheUtils.java:414 
        at org.netbeans.modules.refactoring.javascript.RetoucheUtils.getClasspathInfoFor RetoucheUtils.java:438 
        at org.netbeans.modules.refactoring.javascript.ui.ReNAMERefactoringUI. init> ReNAMERefactoringUI.java:91 
        at org.netbeans.modules.refactoring.javascript.ui.RefactoringActionsProvider$1.createRefactoringUI
RefactoringActionsProvider.java:100 
        at org.netbeans.modules.refactoring.javascript.ui.RefactoringActionsProvider$TextComponentTask.run
RefactoringActionsProvider.java:283 
        at org.netbeans.modules.refactoring.javascript.ui.RefactoringActionsProvider$TextComponentTask.run
RefactoringActionsProvider.java:250 
        at org.netbeans.napi.gsfret.source.Source.runUserActionTask Source.java:467 
        at org.netbeans.modules.refactoring.javascript.ui.RefactoringActionsProvider$TextComponentTask.run
RefactoringActionsProvider.java:289 
        at org.netbeans.modules.refactoring.javascript.ui.RefactoringActionsProvider.doReNAME
RefactoringActionsProvider.java:122 
        at org.netbeans.modules.refactoring.api.impl.ActionsImplementationFactory.doReNAME
ActionsImplementationFactory.java:69
Comment 1 unr303 2008-05-19 07:01:53 UTC
Created attachment 61544 [details]
ide log
Comment 2 Torbjorn Norbye 2008-05-19 19:45:19 UTC
This is with beta -- 6.1 final is out, can you try that?  Your sample refactors correctly for me.  (This is in a Rails
project type. What kind of project is your JavaScript file in?)    By the way, to rename local variables like this, just
invoke Ctrl-R -- it will rename the symbol instantly (and if that isn't possible, e.g. because you're trying it on a
symbol that is really global, it will open the rename refactoring dialog.)
Comment 3 unr303 2008-05-20 06:54:12 UTC
Latest trunk build
new java project
new java package
new javascript file
function b(){
    var c = 1;
    var n = c;    
}
refactor/rename c -> exception
ctrl-r works, refactor/rename doesnt
Comment 4 unr303 2008-05-20 06:54:39 UTC
Created attachment 61592 [details]
ide log
Comment 5 unr303 2008-05-20 06:56:36 UTC
And as you've said doing ctrl-r for file with content
var c = 1;
var n = c;    
(global vars) generates exception.
Comment 6 Exceptions Reporter 2008-05-30 22:01:36 UTC
This issue has already 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=36233
Comment 7 Torbjorn Norbye 2008-06-10 17:39:52 UTC
This was just fixed in 6.5; tracked in issue 136936 to hopefully get it backported to 6.1 as well.

*** This issue has been marked as a duplicate of 136936 ***
Comment 8 Torbjorn Norbye 2008-06-26 17:11:00 UTC
*** Issue 138314 has been marked as a duplicate of this issue. ***