Summary: | [Compiler] NullPointerException with ? operator | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Adam Bartoszewicz <adam.bartoszewicz> |
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | major | ||
Priority: | P3 | ||
Version: | 2.1.2 | ||
Target Milestone: | 2.1.3 | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Description
Adam Bartoszewicz
2003-11-14 10:58:53 EST
Reproduced. Same problem with || operator: public class TestEclipse { public static void main(String[] args) { String s = "a"; System.out.println( s == null || (s.length() == 0 ? TestConst.c1 : TestConst.c2) ); } public static class TestConst { public static final boolean c1 = false; public static final boolean c2 = false; } } Fixed in latest, added regression tests: BooleanTest#test011, test012, test013 Backported to 2.1 stream Verified for 3.0M6 Verified for 2.1.3 with build M200402251535. |