6833839: RFE: improve ManifestDigester by instantiating StringBuilder constructor w/ initial value
authormullan
Thu, 18 Jun 2009 09:04:20 -0400
changeset 3048 5c169b3218a5
parent 2726 d60a9ce3c3ea
child 3049 eb3d33c3771c
6833839: RFE: improve ManifestDigester by instantiating StringBuilder constructor w/ initial value Reviewed-by: weijun
jdk/src/share/classes/sun/security/util/ManifestDigester.java
--- a/jdk/src/share/classes/sun/security/util/ManifestDigester.java	Wed Jul 05 16:52:55 2017 +0200
+++ b/jdk/src/share/classes/sun/security/util/ManifestDigester.java	Thu Jun 18 09:04:20 2009 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2009 Sun Microsystems, Inc.  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
@@ -129,7 +129,7 @@
 
             if (len > 6) {
                 if (isNameAttr(bytes, start)) {
-                    StringBuilder nameBuf = new StringBuilder();
+                    StringBuilder nameBuf = new StringBuilder(sectionLen);
 
                     try {
                         nameBuf.append(