Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 151725 - Wrong "The variable ... may be null" warning
Summary: Wrong "The variable ... may be null" warning
Status: RESOLVED DUPLICATE of bug 136676
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-25 13:06 EDT by Sergey Vladimirov CLA
Modified: 2006-07-26 03:01 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 Sergey Vladimirov CLA 2006-07-25 13:06:37 EDT
Eclipse compiler warnings wrong about variable "var":

    private void test(String var) {
        boolean isNotNull = var != null;
        if (isNotNull) {
            var.length();
        }
    }

Eclipse warns that var can be null in "var.length();" string.
Comment 1 Maxime Daniel CLA 2006-07-26 03:01:00 EDT
The reported case is a proper subpart of the one for 136676.

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