Hi Roger,
On 2019-05-23 16:42, Roger Riggs wrote:
Hi Claes,
Looking good.
Is there any performance benefit to using ?: instead of if..else at
Line 509-515 c = (fromStream) ? (char) (byteBuf[off++] & 0xFF) :
charBuf[off++];
Line 578-581: precedingBackslash = (c == '\\') ? !precedingBackslash :
false;
well, there's possibly a (tiny) benefit: ternary expressions generate
slightly more compact bytecode in some cases; in this case trims away
~40 bytes from LineReader.class. When looking at profiles of how many
get executed there's no real difference though, so it hardly matters.
Line 600: add 'the" to "characters in +the+ following line"
Done!
http://cr.openjdk.java.net/~redestad/8224202/open.04/
/Claes