RFR: 8282316: Operation before String case conversion

Xue-Lei Andrew Fan xuelei at openjdk.java.net
Wed Feb 23 23:34:05 UTC 2022


On Wed, 23 Feb 2022 22:41:10 GMT, Valerie Peng <valeriep at openjdk.org> wrote:

>> In the SignatureUtil implementation, the checkName() requires case-insensitive input for "OID".  However, the method is called before the case conversion, for example: 
>> 
>>             sigName = checkName(sigName).toUpperCase(Locale.ENGLISH); 
>> 
>> This update also clean up redundant calls to the checkName() method.
>
> src/java.base/share/classes/sun/security/util/SignatureUtil.java line 54:
> 
>> 52:      *
>> 53:      * @param algName input, could be in any form
>> 54:      * @return the matching stdName, or {@code algName} if it is not in the
> 
> nit: simplify this return description and emphasize upper case here also? E.g. the matching stdName or the OID string in upper case.

Good point!  I will make this update in this PR.

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

PR: https://git.openjdk.java.net/jdk/pull/7598



More information about the security-dev mailing list