Bug 322545 - NPE in ExternalFoldersManager
Summary: NPE in ExternalFoldersManager
Status: VERIFIED DUPLICATE of bug 321358
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.7   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.7 M2   Edit
Assignee: Ayushman Jain CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-12 10:49 EDT by Uwe Stieber CLA
Modified: 2010-09-14 00:31 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Uwe Stieber CLA 2010-08-12 10:49:13 EDT
With the latest version of ExternalFoldersManager (1.19, included in 3.7M1), there happens a NPE in the refresh job if a .classpath file of an Java project contains a non-existing external reference, which should be simply ignored.

eclipse.buildId=I20100805-1700
java.version=1.6.0_05
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments:  -os win32 -ws win32 -arch x86


Error
Thu Aug 12 16:45:45 CEST 2010
An internal error occurred during: "Refreshing external folders".

java.lang.NullPointerException
at org.eclipse.jdt.internal.core.ExternalFoldersManager$RefreshJob.run(ExternalFoldersManager.java:387)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

It should be tested if the "folder" isn't null before accessing it. Note that this line had been guarded by such a check in the previous version of ExternalFoldersManager (1.18). So re-adding this guard would be great.
Comment 1 Stephan Herrmann CLA 2010-08-12 12:26:07 EDT
Looks like a duplicate of bug 321358.
Also related: bug 320618 which has a pending patch.
Comment 2 Ayushman Jain CLA 2010-08-12 13:30:22 EDT
Indeed a dup. Thanks Stephen.

*** This bug has been marked as a duplicate of bug 321358 ***
Comment 3 Jay Arthanareeswaran CLA 2010-08-23 06:47:55 EDT
(In reply to comment #0)
> With the latest version of ExternalFoldersManager (1.19, included in 3.7M1),
> there happens a NPE in the refresh job if a .classpath file of an Java project
> contains a non-existing external reference, which should be simply ignored.

It doesn't appear to be a simple missing external folder that has caused this bug. As I mentioned in bug 321358, comment 6, it might be the corrupt external folder project or the cache that is causing this.

If you are still able to replicate this behavior, please attach a test case or the workspace, preferably with isolated problem.
Comment 4 Srikanth Sankaran CLA 2010-09-14 00:31:41 EDT
Verified for 3.7 M2 using build I20100909-1700