8353787: Increased number of SHA-384-Digest java.util.jar.Attributes$Name instances leading to higher memory footprint

Reviewed-by: mullan, lancea
This commit is contained in:
Jaikiran Pai 2025-04-08 00:35:33 +00:00
parent edaeb4b2da
commit b64cdc2813

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -727,6 +727,7 @@ public class Attributes implements Map<Object,Object>, Cloneable {
addName(names, new Name("Created-By"));
addName(names, new Name("SHA1-Digest"));
addName(names, new Name("SHA-256-Digest"));
addName(names, new Name("SHA-384-Digest"));
KNOWN_NAMES = Map.copyOf(names);
} else {
// Even if KNOWN_NAMES was read from archive, we still need