Bug 189561 - Danger of NullPointerException in org.eclipse.jdt.core.dom.ASTConverter
Summary: Danger of NullPointerException in org.eclipse.jdt.core.dom.ASTConverter
Status: VERIFIED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M1   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-28 22:24 EDT by Roman Arkhangelskiy CLA
Modified: 2007-12-20 06:45 EST (History)
0 users

See Also:


Attachments
possible NullPointerException (346.24 KB, image/jpeg)
2007-05-28 22:25 EDT, Roman Arkhangelskiy CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Arkhangelskiy CLA 2007-05-28 22:24:25 EDT
Build ID: Source code from CVS (28.05.2007)

Steps To Reproduce:
I have been running Jtest's BugDetective feature on Eclipse source code downloaded from CVS on 28.05.2007 and it reported a possible NullPointerException at line 2707 of
org.eclipse.jdt.core.dom.ASTConverter.java.

The attached screenshot from BugDetective will help to understand the exact flow which may lead to the exception.

Please let me know if this is a real problem or BugDetective is mistaken.

Thank you!

More information:
Comment 1 Roman Arkhangelskiy CLA 2007-05-28 22:25:02 EDT
Created attachment 68987 [details]
possible NullPointerException
Comment 2 Olivier Thomann CLA 2007-05-28 22:32:09 EDT
Technically speaking, getTypeName() cannot return null.
So we could add a null check to prevent the tool from reporting this issue, but it would never be null.
Comment 3 Philipe Mulet CLA 2007-05-29 05:15:20 EDT
I don't think we should add a null check if there is no real reason for it.

Comment 4 Olivier Thomann CLA 2007-07-17 12:52:53 EDT
Closing as INVALID since actual type reference passed in cannot return null for getTypeName().
Comment 5 Frederic Fusier CLA 2007-12-20 06:45:57 EST
Verified for 3.4M1