Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 52238 - NPE in UpdateDependancy.java
Summary: NPE in UpdateDependancy.java
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 1.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 1.2.1   Edit
Assignee: Bogdan Gheorghe CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 528324
  Show dependency tree
 
Reported: 2004-02-17 06:28 EST by Thomas Fletcher CLA
Modified: 2017-12-08 09:59 EST (History)
2 users (show)

See Also:


Attachments
Check for a null location before we go and use it (1.53 KB, patch)
2004-02-17 08:04 EST, Thomas Fletcher CLA
cdtdoug: iplog+
Details | Diff
JUnit test patch (1.89 KB, patch)
2004-02-17 08:14 EST, Thomas Fletcher CLA
cdtdoug: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Fletcher CLA 2004-02-17 06:28:11 EST
I get the following error:
java.lang.NullPointerException
	at 
org.eclipse.cdt.internal.core.sourcedependency.UpdateDependency.execute
(UpdateDependency.java:67)
	at org.eclipse.cdt.internal.core.search.processing.JobManager.run
(JobManager.java:391)
	at java.lang.Thread.run(Thread.java:534)

The problem is that resource.getLocation() is returning null and we are 
not trapping it.  I have not reproduced in a test case, but the documented
behaviour indicates that getLocation() may return null in a number of
different scenarios.
Comment 1 Thomas Fletcher CLA 2004-02-17 08:04:26 EST
Created attachment 7974 [details]
Check for a null location before we go and use it
Comment 2 Thomas Fletcher CLA 2004-02-17 08:14:29 EST
Created attachment 7975 [details]
JUnit test patch
Comment 3 Alain Magloire CLA 2004-02-19 13:09:09 EST
Bogdan, this probably something we would want asap in
the CDT_1.2 branch also.

Resetting the MilesStone.
I believe you commit access, so do not need me to apply the patch.

Thanks, later.
Comment 4 Bogdan Gheorghe CLA 2004-02-19 14:18:03 EST
Sorry - I had applied this patch earlier on this week to 1.2, and sent a 
notice out to the patch list - I should have closed this.

- B