Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 150125 - null reference inappropriate report
Summary: null reference inappropriate report
Status: RESOLVED DUPLICATE of bug 150123
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Maxime Daniel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-10 08:03 EDT by Felis Cattus CLA
Modified: 2006-07-10 09:16 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 Felis Cattus CLA 2006-07-10 08:03:51 EDT
I have the following option set to warning: Java -> Compiler -> Errors/Warnings -> Null references. 
A null reference warning appears in the following code, saying "The variable text may be null":

    boolean hasText = text != null && text.trim().length() != 0;
    boolean saveEnabled = hasText && !text.equals(savedText); // Warning here
Comment 1 Olivier Thomann CLA 2006-07-10 09:16:46 EDT

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