changeset 13191:ff78079f84c0

8197030: Perf regression on all platforms with 8u171-b03 - early lambda use Reviewed-by: weijun
author coffeys
date Tue, 13 Feb 2018 09:25:02 +0000
parents f7ef3bd0680e
children 19dd99252fa3
files src/share/classes/sun/security/util/ManifestDigester.java
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/security/util/ManifestDigester.java	Thu Feb 08 19:38:32 2018 +0000
+++ b/src/share/classes/sun/security/util/ManifestDigester.java	Tue Feb 13 09:25:02 2018 +0000
@@ -169,10 +169,15 @@
                             }
                         }
 
-                        entries.computeIfAbsent(nameBuf.toString(),
-                                                dummy -> new Entry())
+                        Entry e = entries.get(nameBuf.toString());
+                        if (e == null) {
+                            entries.put(nameBuf.toString(), new Entry()
                                 .addSection(new Section(start, sectionLen,
-                                        sectionLenWithBlank, rawBytes));
+                                    sectionLenWithBlank, rawBytes)));
+                        } else {
+                            e.addSection(new Section(start, sectionLen,
+                                    sectionLenWithBlank, rawBytes));
+                        }
 
                     } catch (java.io.UnsupportedEncodingException uee) {
                         throw new IllegalStateException(