summaryrefslogtreecommitdiffstats
path: root/src/org/jetbrains/java/decompiler/util
diff options
context:
space:
mode:
authorEgor.Ushakov <egor.ushakov@jetbrains.com>2014-10-07 21:03:09 +0400
committerEgor.Ushakov <egor.ushakov@jetbrains.com>2014-10-07 21:03:09 +0400
commit9bd8af2b431e06f783755ff1cca8d586bc7b29d5 (patch)
tree432724fc0d05f079835fdc0a15bc37a5eacdd700 /src/org/jetbrains/java/decompiler/util
parent125441a88fc58f74ecfe2c1081a04b6c4d05ea61 (diff)
downloadfernflower-9bd8af2b431e06f783755ff1cca8d586bc7b29d5.tar
fernflower-9bd8af2b431e06f783755ff1cca8d586bc7b29d5.tar.gz
fernflower-9bd8af2b431e06f783755ff1cca8d586bc7b29d5.tar.lz
fernflower-9bd8af2b431e06f783755ff1cca8d586bc7b29d5.tar.xz
fernflower-9bd8af2b431e06f783755ff1cca8d586bc7b29d5.zip
calculate less indent buffers
Diffstat (limited to 'src/org/jetbrains/java/decompiler/util')
-rw-r--r--src/org/jetbrains/java/decompiler/util/InterpreterUtil.java11
1 files changed, 3 insertions, 8 deletions
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) {