Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Turns out their playername was 'null' and half of other players' offences were attributed to them due to null in Java being cast to 'null' curing concatenation...

Why did this happen though? I mean, why was it casted to begin with and why was there a null value?



Usually what happens there is String.toString(null) has been called somewhere (which will return the string "null").

Nulls are fairly normal in Java, and modern Java systems often have ways to define if something can return nulls or not. In the old days you just had to know.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: