On Tue, 9 Feb 2021 19:43:06 GMT, Claes Redestad <redes...@openjdk.org> wrote:
>> src/jdk.charsets/share/classes/sun/nio/cs/ext/EUC_JP.java.template line 116: >> >>> 114: int sp = src.arrayOffset() + src.position(); >>> 115: int sl = src.arrayOffset() + src.limit(); >>> 116: >> >> I see these are removed from encode/decodeArrayLoop(s). Any reason behind >> those? > > My IDE was marking the next line as redundant since `sp <= sl` will always be > true. `buffer.position() <= buffer.limit()` is an invariant that I don't > think we need to assert against here, and I think it's just been copy-pasted > around mindlessly. Thanks, got it. I was wondering any possibility of sp > sl case. ------------- PR: https://git.openjdk.java.net/jdk/pull/2480