RFR: 8273042: TLS Certificate Compression

Xue-Lei Andrew Fan xuelei at openjdk.java.net
Mon Feb 28 23:12:27 UTC 2022


On Mon, 28 Feb 2022 19:44:19 GMT, Jamil Nimeh <jnimeh at openjdk.org> wrote:

>> src/java.base/share/classes/sun/security/ssl/CompressionAlgorithm.java line 49:
>> 
>>> 47:     }
>>> 48: 
>>> 49:     static CompressionAlgorithm nameOf(String name) {
>> 
>> Shouldn't this be valueOf?  We're not consistent in the method name across all our sun.security.ssl enumerations, but more often than not when we return the enumeration object it's via a valueOf call.
>
> Hmmm...I take that back.  Seems like when the input is a string we do go by nameOf.  Maybe this is fine.

I think I see your points. valueOf(String) is a built-in method of enum, where the String input is not the one was expected for the nameOf(String) method.  So nameOf() was used a lot in the SunJSSE provider implementation.

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

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



More information about the security-dev mailing list