On Fri, 18 Jun 2021 01:54:30 GMT, Dongbo He <dongb...@openjdk.org> wrote:
>> Sorry, I missed a "case" in the original comment (corrected). I meant to >> keep the property case sensitive in the hash set so that the keywords like >> "keySize" could be used correctly. > > [checkAlgorithm](https://github.com/openjdk/jdk/blob/a051e735cda0d5ee5cb6ce0738aa549a7319a28c/src/java.base/share/classes/sun/security/util/AbstractAlgorithmConstraints.java#L94) > check whether the item is in the collection by ignoring case. If the item in > the HashSet is case-sensitive, the method will lose its original algorithmic > logic, but will retain it by using a ` new > TreeSet<>(String.CASE_INSENSITIVE_ORDER);` > > Can we use case sensitivity in checkAlgorithm to check an algorithm? The checkAlgorithm is using equalsIgnoreCase(), so it is safe for it. My concern is mainly about the keywords, like "keySize" used the property, not really the algorithm name. It is good to keep the current case sensitive checking behavior unchanged. ------------- PR: https://git.openjdk.java.net/jdk/pull/4424