Hi all,
This commit fixes a bug whereby javax.management.ObjectName.quote()
would miss off the leading quote because StringBuilder('"') resolves
to StringBuilder(int capacity) with the expected amusing consequences.
Cheers,
Gary
Index: ChangeLog
===================================================================
RCS file: /cvsroot/classpath/classpath/ChangeLog,v
retrieving revision 1.9095
diff -u -r1.9095 ChangeLog
--- ChangeLog 9 Feb 2007 16:24:06 -0000 1.9095
+++ ChangeLog 9 Feb 2007 17:23:15 -0000
@@ -1,3 +1,8 @@
+2007-02-09 Gary Benson <[EMAIL PROTECTED]>
+
+ * javax/management/ObjectName.java
+ (quote): Initialize StringBuilder correctly.
+
2007-02-09 Francis Kung <[EMAIL PROTECTED]>
* java/awt/image/BufferedImage: Reformatted.
Index: javax/management/ObjectName.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/management/ObjectName.java,v
retrieving revision 1.3
diff -u -r1.3 ObjectName.java
--- javax/management/ObjectName.java 22 Dec 2006 17:55:55 -0000 1.3
+++ javax/management/ObjectName.java 9 Feb 2007 17:23:15 -0000
@@ -1,5 +1,5 @@
/* ObjectName.java -- Represent the name of a bean, or a pattern for a name.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -673,7 +673,8 @@
*/
public static String quote(String string)
{
- StringBuilder builder = new StringBuilder('"');
+ StringBuilder builder = new StringBuilder();
+ builder.append('"');
for (int a = 0; a < string.length(); ++a)
{
char s = string.charAt(a);