From 9bd8af2b431e06f783755ff1cca8d586bc7b29d5 Mon Sep 17 00:00:00 2001 From: "Egor.Ushakov" Date: Tue, 7 Oct 2014 21:03:09 +0400 Subject: calculate less indent buffers --- src/org/jetbrains/java/decompiler/util/InterpreterUtil.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/org/jetbrains/java/decompiler/util') diff --git a/src/org/jetbrains/java/decompiler/util/InterpreterUtil.java b/src/org/jetbrains/java/decompiler/util/InterpreterUtil.java index 50411bc..67af3ad 100644 --- a/src/org/jetbrains/java/decompiler/util/InterpreterUtil.java +++ b/src/org/jetbrains/java/decompiler/util/InterpreterUtil.java @@ -92,17 +92,12 @@ public class InterpreterUtil { public static String getIndentString(int length) { if (length == 0) return ""; - TextBuffer buf = new TextBuffer(); - appendIndent(buf, length); - return buf.toString(); - } - - public static void appendIndent(TextBuffer buffer, int length) { - if (length == 0) return; + StringBuilder buf = new StringBuilder(); String indent = (String)DecompilerContext.getProperty(IFernflowerPreferences.INDENT_STRING); while (length-- > 0) { - buffer.append(indent); + buf.append(indent); } + return buf.toString(); } public static boolean equalSets(Collection c1, Collection c2) { -- cgit v1.2.3