RFR: 8253821: Improve ByteBuffer performance with GCM [v3]
Valerie Peng
valeriep at openjdk.java.net
Mon Nov 2 19:39:07 UTC 2020
On Wed, 7 Oct 2020 20:50:14 GMT, Anthony Scarpino <ascarpino at openjdk.org> wrote:
>> src/java.base/share/classes/com/sun/crypto/provider/CipherCore.java line 947:
>>
>>> 945: // create temporary output buffer if the estimated size is larger
>>> 946: // than the user-provided buffer.
>>> 947: if (output.length - outputOffset < estOutSize) {
>>
>> "outputCapacity" could be used to replace "output.length - outputOffset", and join the clause with the if-clause above.
>
> interesting.. That makes this and the if condition below it able to join again.
Why changing outputCapacity to output.length - outputOffset? Aren't they the same thing and outputCapacity is already computed?
-------------
PR: https://git.openjdk.java.net/jdk/pull/411
More information about the security-dev
mailing list