Bug 177279 - [model] potential redundant null test in JavaModelManager#containerIsInitializationInProgress
Summary: [model] potential redundant null test in JavaModelManager#containerIsInitiali...
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.3 M6   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-14 03:05 EDT by Maxime Daniel CLA
Modified: 2007-03-14 04:02 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maxime Daniel CLA 2007-03-14 03:05:37 EDT
Source based, around v_741.

Investiging bug 154984, I came accross line 462 of JavaModelManager that tests the result of a call to ThreadLocal#get against null. I believe this is superfluous given the documented behavior of that method.
(Please correct me if I am wrong.)
Comment 1 Maxime Daniel CLA 2007-03-14 04:02:03 EDT
Sorry, ThreadLocal#get() may return null indeed. 'Creates and initializes the copy if this is the first time the thread has called this method' does not explicitly exclude the source of the copy to be null in fact - even if it is misleading.