mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-163730 string literal interning turned off by default
This commit is contained in:
+2
-1
@@ -26,6 +26,7 @@ import com.intellij.debugger.engine.evaluation.EvaluateExceptionUtil;
|
||||
import com.intellij.debugger.engine.evaluation.EvaluationContextImpl;
|
||||
import com.intellij.debugger.impl.DebuggerUtilsEx;
|
||||
import com.intellij.debugger.jdi.VirtualMachineProxyImpl;
|
||||
import com.intellij.openapi.util.registry.Registry;
|
||||
import com.sun.jdi.ClassType;
|
||||
import com.sun.jdi.Method;
|
||||
import com.sun.jdi.StringReference;
|
||||
@@ -65,7 +66,7 @@ class LiteralEvaluator implements Evaluator {
|
||||
return vm.mirrorOfStringLiteral(((String)myValue), () -> {
|
||||
StringReference str = vm.mirrorOf((String)myValue);
|
||||
// intern starting from jdk 7
|
||||
if (vm.versionHigher("1.7")) {
|
||||
if (Registry.is("debugger.intern.string.literals") && vm.versionHigher("1.7")) {
|
||||
Method internMethod = ((ClassType)str.referenceType()).concreteMethodByName("intern", "()Ljava/lang/String;");
|
||||
if (internMethod != null) {
|
||||
return (StringReference)context.getDebugProcess().invokeMethod(context, str, internMethod, Collections.emptyList());
|
||||
|
||||
Reference in New Issue
Block a user