r/programming • u/jonjonbee • Jun 05 '18
Code golfing challenge leads to discovery of string concatenation bug in JDK 9+ compiler
https://stackoverflow.com/questions/50683786/why-does-arrayin-i-give-different-results-in-java-8-and-java-10
2.2k
Upvotes
View all comments
Show parent comment
-10
u/ShiitakeTheMushroom Jun 05 '18
Exactly. The code is behaving exactly how we would expect it to. This seems like one of those "gotchas" that you either need to be told about (say, in a post like this), or something you painfully learn after hours of debugging why your application isn't behaving as expected, but it doesn't seem like an error to me.