diff options
Diffstat (limited to 'bundles/org.eclipse.osgi/osgi/src/org/osgi/service/condpermadmin/ConditionInfo.java')
-rw-r--r-- | bundles/org.eclipse.osgi/osgi/src/org/osgi/service/condpermadmin/ConditionInfo.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/service/condpermadmin/ConditionInfo.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/service/condpermadmin/ConditionInfo.java index 3302f4293..63fc25a20 100644 --- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/service/condpermadmin/ConditionInfo.java +++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/service/condpermadmin/ConditionInfo.java @@ -143,7 +143,7 @@ public class ConditionInfo { } } } - this.args = argsList.toArray(new String[argsList.size()]); + this.args = argsList.toArray(new String[0]); /* the final character must be ']' */ char c = encoded[pos]; @@ -183,7 +183,7 @@ public class ConditionInfo { * @return The string encoding of this {@code ConditionInfo}. */ public final String getEncoded() { - StringBuffer output = new StringBuffer(); + StringBuilder output = new StringBuilder(); output.append('['); output.append(type); @@ -281,9 +281,9 @@ public class ConditionInfo { /** * This escapes the quotes, backslashes, \n, and \r in the string using a - * backslash and appends the newly escaped string to a StringBuffer. + * backslash and appends the newly escaped string to a StringBuilder. */ - private static void escapeString(String str, StringBuffer output) { + private static void escapeString(String str, StringBuilder output) { int len = str.length(); for (int i = 0; i < len; i++) { char c = str.charAt(i); @@ -310,7 +310,7 @@ public class ConditionInfo { * Takes an encoded character array and decodes it into a new String. */ private static String unescapeString(char[] str, int begin, int end) { - StringBuffer output = new StringBuffer(end - begin); + StringBuilder output = new StringBuilder(end - begin); for (int i = begin; i < end; i++) { char c = str[i]; if (c == '\\') { |