Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 183765

Summary: [compiler][null][correlation] unneccesary warning for possible null value - involving non final boolean flag
Product: [Eclipse Project] JDT Reporter: melhor <peter_and1>
Component: CoreAssignee: Maxime Daniel <maxime_daniel>
Status: RESOLVED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P3 CC: stephan.herrmann
Version: 3.2.1Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description melhor CLA 2007-04-24 07:32:29 EDT
If the warning for 'Null reference' has been enabled in the projects compiler settings, the warning 'The variable xx may be null' occurs in the following code but it shouldn't:

      boolean isNull = false;
      String string = anyMethodReturningString();
      isNull = (string == null);
      if (!isNull) {
         string.toString();    // here the variable value is marked as warning
      }
Comment 1 Maxime Daniel CLA 2007-04-24 08:48:10 EDT
Thanks for reporting. This is a known weakness of our current implementation: we do not address variables correlation. Unfortunately, we do not plan to address this in 3.3 time frame.

*** This bug has been marked as a duplicate of bug 136309 ***
Comment 2 Olivier Thomann CLA 2007-04-24 12:06:12 EDT
Reopen to assign
Comment 3 Olivier Thomann CLA 2007-04-24 12:06:48 EDT

*** This bug has been marked as a duplicate of bug 136309 ***
Comment 4 Olivier Thomann CLA 2007-04-27 10:38:37 EDT
Removing target since duplicate bug has no target and is not fixed.
Comment 5 Stephan Herrmann CLA 2018-08-30 10:43:55 EDT

*** This bug has been marked as a duplicate of bug 538421 ***