RFR: JDK-8291509 Minor cleanup could be done in sun.security [v4]

Mark Powers mpowers at openjdk.org
Thu Sep 1 16:05:36 UTC 2022


On Thu, 1 Sep 2022 13:57:38 GMT, Weijun Wang <weijun at openjdk.org> wrote:

>> Mark Powers has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   comments from Sean and Max
>
> src/java.base/share/classes/sun/security/util/AlgorithmDecomposer.java line 110:
> 
>> 108:                     !elements.contains(e.getKey())) {
>> 109:                 elements.add(e.getKey());
>> 110:             } else if (elements.contains(e.getKey())) {
> 
> I assume this means that the `add()` method will behave the same anyway, but the original code does seem more clear to me.

I'll keep the original code.

-------------

PR: https://git.openjdk.org/jdk/pull/9972



More information about the security-dev mailing list