Summary: | JACKS - The null literal should not be considered as a constant expression | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Olivier Thomann <Olivier_Thomann> |
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | ||
Version: | 2.1 | ||
Target Milestone: | 2.1 M4 | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Description
Olivier Thomann
2002-11-13 13:23:52 EST
Another test case: class A { void foo() { boolean b = "" + null == "null"; System.out.println(b); } } The first example seems right to me. We are more optimized. Do you have an example showing an actual problem ? In the second example we don't do the string concatenation. We inline the constant. In fact we should never inline the constant when it is a null literal. I am not sure we "can" optimize the first case. Took String concatenation inlining when null is an argument. Keeping internal constant folding with null literals still. Fixed Removed internal null constants. Fixed Verified. |