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

Bug 150133

Summary: null reference inappropriate report
Product: [Eclipse Project] JDT Reporter: Felis Cattus <feles>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 3.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Felis Cattus CLA 2006-07-10 09:31:56 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:44:31 EDT

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