Add "SHA-384" as a known attribute

Jaikiran Pai jai.forums2013 at gmail.com
Fri Apr 4 17:05:38 UTC 2025


The caching of some attribute names in the java.util.jar.Attributes 
class appears to have been introduced in 
https://bugs.openjdk.org/browse/JDK-6805750 (RFR 
https://mail.openjdk.org/pipermail/core-libs-dev/2018-April/052697.html).

Given the precedence, it may be OK to add "SHA-384-Digest" to that set, 
but I don't know how much (if any) would it help with the performance. 
Did you happen to notice any performance issues which prompted you to 
look at this cache?

-Jaikiran

On 04/04/25 10:25 pm, Jaikiran Pai wrote:
> Since this is about caching values in the java.util.jar.Attributes 
> class, the discussion is more appropriate in the core-libs-dev mailing 
> list. I've added it to the "To" now and "Bcc"ed the jdk-dev mailing 
> list. Please subscribe to core-libs-dev 
> https://mail.openjdk.org/mailman/listinfo/core-libs-dev if you haven't 
> already and we can continue the discussion there.
>
> -Jaikiran
>
> On 04/04/25 8:54 pm, Ayman wrote:
>> Hello,
>>
>> Starting from JDK 19, SHA-384 is replacing SHA-256 as the default 
>> digest algorithm in the jarsigner: 
>> https://bugs.openjdk.org/browse/JDK-8283475
>>
>> This means that the string "SHA-384" is now written multiples times 
>> is the MANIFEST files, this has been tackled in the past by adding 
>> the string "SHA-256" as a KNOWN_NAME that shouldn't be duplicated in 
>> memory: 
>> https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/util/jar/Attributes.java#L729 
>>
>>
>> Is it possible to do the same with "SHA-384"?
>>
>> Thanks,


More information about the core-libs-dev mailing list