6833839: RFE: improve ManifestDigester by instantiating StringBuilder constructor w/ initial value
Reviewed-by: weijun
--- 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(