On Thu, 20 May 2021 00:57:42 GMT, Valerie Peng <valer...@openjdk.org> wrote:
>> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix perf problem by reorganizing doLastBlock() > > src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java > line 874: > >> 872: } else if (!src.isDirect() && !dst.isDirect()) { >> 873: // if src is read only, then we need a copy >> 874: if (!src.isReadOnly()) { > > Do you mean if (src.hasArray() && dst.hasArray())? Even if src is not read > only, but array()/arrayOffset() methods are optional and can only be safely > invoked after the hasArray() call. I assume this is again the case of !isDirect()&&!isReadOnly => hasArray()? ------------- PR: https://git.openjdk.java.net/jdk/pull/4072