2007-02-09 Gary Benson <gbenson@redhat.com>

* javax/management/ObjectName.java
	(quote): Initialize StringBuilder correctly.

From-SVN: r121765
This commit is contained in:
Gary Benson 2007-02-09 17:15:20 +00:00 committed by Gary Benson
parent 35a63f2131
commit 87a8ec2bf7
3 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2007-02-09 Gary Benson <gbenson@redhat.com>
* javax/management/ObjectName.java
(quote): Initialize StringBuilder correctly.
2007-02-08 Gary Benson <gbenson@redhat.com> 2007-02-08 Gary Benson <gbenson@redhat.com>
* javax/management/MBeanServerFactory.java * javax/management/MBeanServerFactory.java

View File

@ -674,7 +674,8 @@ public class ObjectName
*/ */
public static String quote(String string) public static String quote(String string)
{ {
StringBuilder builder = new StringBuilder('"'); StringBuilder builder = new StringBuilder();
builder.append('"');
for (int a = 0; a < string.length(); ++a) for (int a = 0; a < string.length(); ++a)
{ {
char s = string.charAt(a); char s = string.charAt(a);