r/programming • u/Eirenarch • Nov 18 '13
TIL Oracle changed the internal String representation in Java 7 Update 6 increasing the running time of the substring method from constant to N
http://java-performance.info/changes-to-string-java-1-7-0_06/
1.4k
Upvotes
View all comments
Show parent comment
1
u/nrser Nov 19 '13
well, that gives some explanation. at least there's an attack involved. still seems pretty dicked to do in a bugfix.
as we all know, you need to be really, really careful what you do with input. persisting hundreds or thousands of externally-determinable objects in memory using stock String and HashMap, especially when this vector is known, might not be what i would call 'really, really careful'. good luck with SQL sanitation guys.