Re: svn commit: r739577 - /ant/core/trunk/src/main/org/apache/tools/ant/property/NullReturn.java

2009-01-31 Thread Matt Benson
I always thought String.valueOf(null) returned "null". Was I on crack? -Matt P.S. Good to see you committing, Martijn... --- j...@apache.org wrote: > Author: jkf > Date: Sat Jan 31 17:10:50 2009 > New Revision: 739577 > > URL: > http://svn.apache.org/viewvc?rev=739577&view=rev > Log: > Origi

Re: svn commit: r739577 - /ant/core/trunk/src/main/org/apache/tools/ant/property/NullReturn.java

2009-01-31 Thread Martijn Kruithof
Doubted it, checked it and it returned NullPointerException. D:\>type Test.java public class Test { public static void main(String[] args) { System.out.println(String.valueOf(null)); } } D:\>java Test Exception in thread "main" java.lang.NullPointerException at java.lang.String.(Unknown S

AW: svn commit: r739577 - /ant/core/trunk/src/main/org/apache/tools/ant/property/NullReturn.java

2009-02-01 Thread Jan.Materne
st > Betreff: Re: svn commit: r739577 - > /ant/core/trunk/src/main/org/apache/tools/ant/property/NullReturn.java > > Doubted it, checked it and it returned NullPointerException. > > D:\>type Test.java > public class Test > { > public static void main(String[] args) >

Re: svn commit: r739577 - /ant/core/trunk/src/main/org/apache/tools/ant/property/NullReturn.java

2009-02-02 Thread Archie Cobbs
of course, simply returning "null" is much easier ;) > > > > Jan > > > > > -Ursprüngliche Nachricht----- > > Von: Martijn Kruithof [mailto:j...@kruithof.xs4all.nl] > > Gesendet: Samstag, 31. Januar 2009 22:14 > > An: Ant Developers List >

Re: svn commit: r739577 - /ant/core/trunk/src/main/org/apache/tools/ant/property/NullReturn.java

2009-02-02 Thread Matt Benson
4: NPE > > Java 1.6.0_02-b05: NPE > > > > If I add a cast then it works > >System.out.println(String.valueOf( (Object)null > )); > > > > So the compiler must bind that to another method > than > > String.valueOf(Object) ... > > > > > >

Re: svn commit: r739577 - /ant/core/trunk/src/main/org/apache/tools/ant/property/NullReturn.java

2009-02-02 Thread Matt Benson
What JDK/JRE is that? The Sun Java6 API doc still says it should return "null". Whatta bitch. -Matt --- Martijn Kruithof wrote: > Doubted it, checked it and it returned > NullPointerException. > > D:\>type Test.java > public class Test > { > public static void main(String[] args) > { > Syste