Bug 320216

Summary: Null anaysis not done for autoboxing
Product: [Eclipse Project] JDT Reporter: utilisateur_768
Component: CoreAssignee: Ayushman Jain <amj87.iitr>
Status: VERIFIED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: amj87.iitr, Olivier_Thomann
Version: 3.6   
Target Milestone: 3.7 M2   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description utilisateur_768 CLA 2010-07-19 02:46:33 EDT
Build id: I20100608-0911

Hi, if call "intValue()" method in the example below, i get a warning/error, but if i use autoboxing, i don't. Could you please fix it?

public class AutoboxingNull {
  public int foo(Integer i) {
    if (i == null)
      return i.intValue(); // i can only be null
    return 0;
  }
  
  public int bar(Integer i) {
    if (i == null)
      return i; // no error or warning
    return 0;
  }
  
}
Comment 1 Ayushman Jain CLA 2010-07-19 02:51:48 EDT
This is same as bug 319201.

*** This bug has been marked as a duplicate of bug 319201 ***
Comment 2 Olivier Thomann CLA 2011-01-25 11:14:05 EST
Verified.