To cover this problem, I filed a new language suggestion:
https://bugs.openjdk.java.net/browse/JDK-8033813 :-)

-Ulf


Am 06.02.2014 18:59, schrieb Ulf Zibis:
I still more like the break-to-label approach. It looks more logical and saves one comparison. This might count on very very short strings, but I would rename it to something like find1stUpperCase: or scanForUpperCase.

As an alternative you could write "if (first >= len)" as counterpart to the last "first < len" operation in the for loop, which therefore should be merged by JIT.
(Or use "first != len" in the for loop.)

-Ulf




Reply via email to