Bug 10794 - NPE from search during refactor, pull up method
Summary: NPE from search during refactor, pull up method
Status: RESOLVED DUPLICATE of bug 10340
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 major (vote)
Target Milestone: 2.0 M4   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-05 13:01 EST by John Arthorne CLA
Modified: 2002-03-05 14:02 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Arthorne CLA 2002-03-05 13:01:36 EST
Build 20020214

Even though the error occurred during refactoring, the stack trace suggested the 
error is in JDT Core, so I've logged it here.

1) Grab project org.eclipse.core.tests.resources from dev.eclipse.org
2) In class org.eclipse.core.tests.resources.MarkerTest, select
   method assertEquals(String, Object[], Object[]) in the content outline
3) On page one, select to delete the old method
4) Hit next.  An internal error occurs.  The page contains the
string "Internal error while creating a change object.  See log for details."

The log contained the following:

java.lang.reflect.InvocationTargetException: java.lang.NullPointerException
	at 
org.eclipse.jdt.internal.core.search.matching.MatchLocator.lookupType(MatchLocat
or.java:581)
	at 
org.eclipse.jdt.internal.core.search.matching.DeclarationOfAccessedFieldsPattern
.reportDeclaration(DeclarationOfAccessedFieldsPattern.java:79)
	at 
org.eclipse.jdt.internal.core.search.matching.DeclarationOfAccessedFieldsPattern
.matchReportReference(DeclarationOfAccessedFieldsPattern.java:69)
	at 
org.eclipse.jdt.internal.core.search.matching.MatchSet.reportMatching(MatchSet.j
ava(Compiled Code))
	at 
org.eclipse.jdt.internal.core.search.matching.MatchSet.reportMatching(MatchSet.j
ava(Compiled Code))
	at 
org.eclipse.jdt.internal.core.search.matching.MatchSet.reportMatching(MatchSet.j
ava(Compiled Code))
	at 
org.eclipse.jdt.internal.core.search.matching.MatchSet.reportMatching(MatchSet.j
ava(Compiled Code))
	at 
org.eclipse.jdt.internal.core.search.matching.MatchingOpenable.locateMatchesInCo
mpilationUnit(MatchingOpenable.java:288)
	at 
org.eclipse.jdt.internal.core.search.matching.MatchingOpenable.locateMatches(Mat
chingOpenable.java:141)
	at 
org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLo
cator.java:1182)
	at 
org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLo
cator.java:509)
	at 
org.eclipse.jdt.core.search.SearchEngine.searchDeclarationsOfAccessedFields(Sear
chEngine.java:571)
	at 
org.eclipse.jdt.internal.corext.refactoring.structure.ReferenceFinderUtil.getFie
ldReferencesIn(ReferenceFinderUtil.java:72)
	at 
org.eclipse.jdt.internal.corext.refactoring.structure.ReferenceFinderUtil.getFie
ldReferencesIn(ReferenceFinderUtil.java:64)
	at 
org.eclipse.jdt.internal.corext.refactoring.structure.ReferenceFinderUtil.getFie
ldsReferencedIn(ReferenceFinderUtil.java:55)
	at 
org.eclipse.jdt.internal.corext.refactoring.structure.PullUpRefactoring.checkAcc
essedFields(PullUpRefactoring.java:422)
	at 
org.eclipse.jdt.internal.corext.refactoring.structure.PullUpRefactoring.checkAcc
esses(PullUpRefactoring.java:394)
	at 
org.eclipse.jdt.internal.corext.refactoring.structure.PullUpRefactoring.checkInp
ut(PullUpRefactoring.java:300)
	at 
org.eclipse.jdt.internal.ui.refactoring.CheckConditionsOperation.run(CheckCondit
ionsOperation.java:58)
	at 
org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run(CreateChangeOp
eration.java:93)
	at 
org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.jav
a:98)
Comment 1 Philipe Mulet CLA 2002-03-05 14:02:20 EST
Closing duplicate of bug 10340

*** This bug has been marked as a duplicate of 10340 ***