Summary: | varargs treats "null" inputs wrong at the first position | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Eric Bodden <eric> |
Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
Status: | RESOLVED DUPLICATE | QA Contact: | |
Severity: | major | ||
Priority: | P3 | ||
Version: | 3.0 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Eric Bodden
2005-03-19 19:55:39 EST
Could you please provide the build id? This is I20050219-1500. Here my test case: ____ public class T { /** * @param args */ public static void main(String[] args) { foo("abc",null); foo(new Object[]{null,"abc"}); foo(null,"abc"); } static void foo(Object... o) { System.out.println(o[1]); } } ____ This outputs: null abc Exception in thread "main" java.lang.NullPointerException at T.foo(T.java:16) at T.main(T.java:11) (because o is null in the third case) With latest, I get: null abc abc Closing as WORKSFORME. Reopen to close as duplicate. |