Re: inconsistent results from String.valueOf

2011-10-10 Thread Alexander Taggart
It's precisely the behaviour you would get by calling String.valueOf(null) in java. Nulls match to the most specific parameter type in a given hierarchy, and in this case, that would be char[] instead of Object. If the param types were not in the same hierarchy, say char[] and String, then

inconsistent results from String.valueOf

2011-10-09 Thread Jack Moffitt
Hi, I discovered this testing some code this evening: (String/valueOf nil) ; throws NullPointerException (#(String/valueOf %) nil) ; null Another formulation of the above (courtesy of brehaut in IRC): (let [s nil] (String/valueOf s)) ; exception (let [s nil] (String/valueOf ^Object s)) ; null