On Wed, 21 Dec 2022 20:23:25 GMT, Xue-Lei Andrew Fan <[email protected]> wrote:
>> Volker Simonis has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Optimized initialisation of currentKeyID and deletion of expired session
>> keys as proposed by @schlosna
>
> src/java.base/share/classes/sun/security/ssl/SSLSessionContextImpl.java line
> 187:
>
>> 185:
>> 186: // Package-private, used only from SSLContextImpl::getKey() to
>> create a new session key.
>> 187: int getCurrentKeyID() {
>
> This method could be removed if you want to move SSLContextImpl.getKey() into
> this class.
Done.
> src/java.base/share/classes/sun/security/ssl/SSLSessionContextImpl.java line
> 191:
>
>> 189: }
>> 190:
>> 191: private void cleanupSessionKeys() {
>
> What do you think if using CleanupStatelessKeys as the method name?
Fine for me.
> src/java.base/share/classes/sun/security/ssl/SSLSessionContextImpl.java line
> 226:
>
>> 224: return keyHashMap.get(id);
>> 225: }
>> 226:
>
> It may need to reconsider these 3 methods you want to move
> SSLContextImpl.getKey() into this class.
Refactored as proposed.
-------------
PR: https://git.openjdk.org/jdk/pull/11590