mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-06 06:21:16 +07:00
DebuggerUtils#translateStringValue: useless if removed, SpinAllocator removed
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -42,7 +42,6 @@ import com.intellij.psi.util.InheritanceUtil;
|
||||
import com.intellij.psi.util.PsiTreeUtil;
|
||||
import com.intellij.psi.util.PsiTypesUtil;
|
||||
import com.intellij.util.IncorrectOperationException;
|
||||
import com.intellij.util.StringBuilderSpinAllocator;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import com.sun.jdi.*;
|
||||
import org.jdom.Element;
|
||||
@@ -201,17 +200,9 @@ public abstract class DebuggerUtils {
|
||||
|
||||
public static String translateStringValue(final String str) {
|
||||
int length = str.length();
|
||||
final StringBuilder buffer = StringBuilderSpinAllocator.alloc();
|
||||
try {
|
||||
StringUtil.escapeStringCharacters(length, str, buffer);
|
||||
if (str.length() > length) {
|
||||
buffer.append("...");
|
||||
}
|
||||
return buffer.toString();
|
||||
}
|
||||
finally {
|
||||
StringBuilderSpinAllocator.dispose(buffer);
|
||||
}
|
||||
final StringBuilder buffer = new StringBuilder();
|
||||
StringUtil.escapeStringCharacters(length, str, buffer);
|
||||
return buffer.toString();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
Reference in New Issue
Block a user