Bug 189561

Summary: Danger of NullPointerException in org.eclipse.jdt.core.dom.ASTConverter
Product: [Eclipse Project] JDT Reporter: Roman Arkhangelskiy <rarkhangelskiy>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: VERIFIED INVALID QA Contact:
Severity: normal    
Priority: P3    
Version: 3.3   
Target Milestone: 3.4 M1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
possible NullPointerException none

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