Summary: | Inconsistent output when using comparrisson operators | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Bruce Haefele <bruce.haefele> |
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | minor | ||
Priority: | P3 | ||
Version: | 2.1 | ||
Target Milestone: | 3.0 M1 | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Description
Bruce Haefele
2003-06-03 09:43:29 EDT
Moving to JDT-Core. Reproduced. It works ok if using the operator '||' instead. Bug was in boolean optimized codegen (forgot to use intermediate labels for | and & operators). Fixed. Note that on following code, we generate a bytecode length of 25, where Javac 1.4.2 ends up with a bytecode length of 51. public static void main(String[] args) throws Throwable { int x = 2; int y = 5; if ((((x > 1) && (y == 5)) & false)) { System.out.println("true"); } else { System.out.println("false"); } System.out.println("DONE"); } Verified. |