java-decompiler: optimization (less string buffer allocations on generating text)
This commit is contained in:
@@ -60,14 +60,18 @@ public class InterpreterUtil {
|
||||
}
|
||||
|
||||
public static String getIndentString(int length) {
|
||||
String indent = (String)DecompilerContext.getProperty(IFernflowerPreferences.INDENT_STRING);
|
||||
StringBuilder buf = new StringBuilder();
|
||||
while (length-- > 0) {
|
||||
buf.append(indent);
|
||||
}
|
||||
appendIndent(buf, length);
|
||||
return buf.toString();
|
||||
}
|
||||
|
||||
public static void appendIndent(StringBuilder buffer, int length) {
|
||||
String indent = (String)DecompilerContext.getProperty(IFernflowerPreferences.INDENT_STRING);
|
||||
while (length-- > 0) {
|
||||
buffer.append(indent);
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean equalSets(Collection<?> c1, Collection<?> c2) {
|
||||
if (c1 == null) {
|
||||
return c2 == null;
|
||||
|
||||
Reference in New Issue
Block a user