Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 193729 - NullPointerException at org.netbeans.modules.refactoring.php.findusages.WhereUsedElement.create
NullPointerException at org.netbeans.modules.refactoring.php.findusages.Where...
Product: php
Classification: Unclassified
Component: Refactoring
All All
: P2 (vote)
: 7.0
Assigned To: Petr Pisl
Depends on:
  Show dependency treegraph
Reported: 2010-12-22 09:53 UTC by FTDeBUGgeR
Modified: 2011-03-14 20:16 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT

stacktrace (1.13 KB, text/plain)
2010-12-22 09:53 UTC, FTDeBUGgeR
stacktrace (1.15 KB, text/plain)
2011-01-25 13:30 UTC, Sc0tTyXL

Note You need to log in before you can comment on or make changes to this bug.
Description FTDeBUGgeR 2010-12-22 09:53:19 UTC
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

   at org.netbeans.modules.refactoring.php.findusages.WhereUsedElement.create(
   at org.netbeans.modules.refactoring.php.findusages.WhereUsedSupport$Results.addEntry(
   at org.netbeans.modules.refactoring.php.findusages.WhereUsedSupport$Results.access$300(
   at org.netbeans.modules.refactoring.php.findusages.WhereUsedSupport.collectUsages(
   at org.netbeans.modules.refactoring.php.findusages.PhpWhereUsedQueryPlugin.prepare(
   at org.netbeans.modules.refactoring.api.AbstractRefactoring.pluginsPrepare2(
Comment 1 FTDeBUGgeR 2010-12-22 09:53:23 UTC
Created attachment 104389 [details]
Comment 2 Sc0tTyXL 2011-01-25 13:30:33 UTC
Created attachment 105333 [details]

Tried to do a refactor, project wide.

Got this exception when doing the search.
Comment 3 Exceptions Reporter 2011-02-03 11:52:51 UTC
This bug already has 5 duplicates 
Comment 4 Exceptions Reporter 2011-03-04 17:58:20 UTC
This bug already has 20 duplicates 
Comment 5 Petr Pisl 2011-03-10 12:38:23 UTC
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:

and adding logging
Comment 6 Petr Pisl 2011-03-10 13:17:03 UTC
Can someone from QA tested?
Comment 7 Marian Mirilovic 2011-03-10 21:13:30 UTC
(In reply to comment #6)
> Can someone from QA tested?

Yes, we'll do so.
Comment 8 Vladimir Riha 2011-03-10 21:31:58 UTC
I'll test it as soon as possible
Comment 9 Quality Engineering 2011-03-11 09:40:06 UTC
Integrated into 'main-golden', will be available in build *201103110400* on (upload may still be in progress)
User: Petr Pisl <>
Log: #193729 - NullPointerException at org.netbeans.modules.refactoring.php.findusages.WhereUsedElement.create
Comment 10 Vladimir Riha 2011-03-11 17:00:40 UTC
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
Comment 11 Petr Pisl 2011-03-14 20:16:49 UTC
The patch transplanted into releases repository, release70 branch

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo