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 218591 - NullPointerException at org.netbeans.modules.refactoring.java.RefactoringUtils.getPackageName
Summary: NullPointerException at org.netbeans.modules.refactoring.java.RefactoringUtil...
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 7.3
Hardware: All All
: P2 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-19 07:17 UTC by mienamoo
Modified: 2012-09-21 08:03 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 192560


Attachments
stacktrace (7.30 KB, text/plain)
2012-09-19 07:17 UTC, mienamoo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mienamoo 2012-09-19 07:17:42 UTC
Build: NetBeans IDE Dev (Build 201209190001)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.1-b03, Java(TM) SE Runtime Environment, 1.7.0_05-b05
OS: Windows 7

User Comments:
mienamoo: While testing the fix for Bug 218133, I started to move a brand new, empty class between two packages in the same Maven-based NetBeans Platform module. When I got to the Move Class dialog, I decided to check the To Type check box to see what it does. And at that point this exception occurred. This is a different exception from the previous one.




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.refactoring.java.RefactoringUtils.getPackageName(RefactoringUtils.java:371)
   at org.netbeans.modules.refactoring.java.plugins.MoveFileRefactoringPlugin.getNewPackageName(MoveFileRefactoringPlugin.java:376)
   at org.netbeans.modules.refactoring.java.plugins.MoveFileRefactoringPlugin.getTargetPackageName(MoveFileRefactoringPlugin.java:400)
   at org.netbeans.modules.refactoring.java.plugins.MoveFileRefactoringPlugin.fastCheckParameters(MoveFileRefactoringPlugin.java:169)
   at org.netbeans.modules.refactoring.api.AbstractRefactoring.pluginsFastCheckParams(AbstractRefactoring.java:530)
   at org.netbeans.modules.refactoring.api.AbstractRefactoring.fastCheckParameters(AbstractRefactoring.java:283)
Comment 1 mienamoo 2012-09-19 07:17:46 UTC
Created attachment 124552 [details]
stacktrace
Comment 2 Ralph Ruijs 2012-09-19 09:21:15 UTC
There seems to be a difference when starting the refactoring from editor, or from the projects tab.
Comment 3 Ralph Ruijs 2012-09-20 01:22:45 UTC
changeset:   48f4b7ab54cb                                                                                                                              
user:        Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
date:        Thu Sep 20 03:19:40 2012 +0200
summary:     #218591 - Merged MoveFile and MoveClass refactoring plugins
Comment 4 Quality Engineering 2012-09-21 02:24:52 UTC
Integrated into 'main-golden', will be available in build *201209210001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/48f4b7ab54cb
User: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
Log: #218591 - Merged MoveFile and MoveClass refactoring plugins
Comment 5 mienamoo 2012-09-21 08:03:41 UTC
Verified with build 201209210001.