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.
Build: NetBeans IDE Dev (Build 101218-c87f4bc20449) VM: Java HotSpot(TM) Client VM, 17.1-b03, Java(TM) SE Runtime Environment, 1.6.0_22-b04 OS: Linux Stacktrace: java.lang.NullPointerException at org.netbeans.modules.refactoring.php.findusages.WhereUsedElement.create(WhereUsedElement.java:0) at org.netbeans.modules.refactoring.php.findusages.WhereUsedSupport$Results.addEntry(WhereUsedSupport.java:0) at org.netbeans.modules.refactoring.php.findusages.WhereUsedSupport$Results.access$300(WhereUsedSupport.java:0) at org.netbeans.modules.refactoring.php.findusages.WhereUsedSupport.collectUsages(WhereUsedSupport.java:0) at org.netbeans.modules.refactoring.php.findusages.PhpWhereUsedQueryPlugin.prepare(PhpWhereUsedQueryPlugin.java:0) at org.netbeans.modules.refactoring.api.AbstractRefactoring.pluginsPrepare2(AbstractRefactoring.java:0)
Created attachment 104389 [details] stacktrace
Created attachment 105333 [details] stacktrace Tried to do a refactor, project wide. Got this exception when doing the search.
This bug already has 5 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=161381
This bug already has 20 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=161381
IMHO the situation can happen when the project has the default encoding UTF-8 and there are files that are not in UTF-8 encoding. The the document is not opened and the refactoring can not be done. Fixed in the web main: http://hg.netbeans.org/web-main/rev/dcd173f0ae37 and adding logging http://hg.netbeans.org/web-main/rev/6948d24b1a4f
Can someone from QA tested?
(In reply to comment #6) > Can someone from QA tested? Yes, we'll do so.
I'll test it as soon as possible
Integrated into 'main-golden', will be available in build *201103110400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/dcd173f0ae37 User: Petr Pisl <ppisl@netbeans.org> Log: #193729 - NullPointerException at org.netbeans.modules.refactoring.php.findusages.WhereUsedElement.create
I created project and put some files with different encoding (utf-8 and ANSII), one with method declaration, other one with was calling this method. Command "Find Usages" works fine, "Refactor Rename" also without problems. Verified
The patch transplanted into releases repository, release70 branch