Revert "Bug562295 - temp fix for NPE"
This reverts commit df8b43f26759cbfc9f031a2eec94b2db74b4b659.
Change-Id: Id6659c70e26cabf9bee0cb83a391b1b1a5ef63a7
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/RemoteEvaluatorTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/RemoteEvaluatorTests.java
index 4c9c93f..4ea3845 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/RemoteEvaluatorTests.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/eval/RemoteEvaluatorTests.java
@@ -44,22 +44,6 @@
assertEquals("count is not 0", "0", value.getValueString());
}
- public void testEvaluate_InInnerScope_PrivateFieldInSameScope() throws Exception {
- debugWithBreakpoint("RemoteEvaluator", 20);
- IValue value = evaluate("java.util.Arrays.asList(\"a\", \"b\", \"ac\").stream().filter(v -> this.Q_EMPTY.test(v)).count()");
-
- assertNotNull("result is null", value);
- assertEquals("count is not 0", "0", value.getValueString());
- }
-
- public void testEvaluate_InInnerScope_PrivateFieldInSameScope_WithoutThis() throws Exception {
- debugWithBreakpoint("RemoteEvaluator", 20);
- IValue value = evaluate("java.util.Arrays.asList(\"a\", \"b\", \"ac\").stream().filter(v -> Q_EMPTY.test(v)).count()");
-
- assertNotNull("result is null", value);
- assertEquals("count is not 0", "0", value.getValueString());
- }
-
@Override
protected IJavaProject getProjectContext() {
return get18Project();
diff --git a/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/RemoteEvaluatorBuilder.java b/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/RemoteEvaluatorBuilder.java
index f33346c..c3bedfb 100644
--- a/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/RemoteEvaluatorBuilder.java
+++ b/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/RemoteEvaluatorBuilder.java
@@ -1513,7 +1513,7 @@
} else {
// TODO: Fix this to use same method as visit(FieldAccess)
ITypeBinding declaringClass = vb.getDeclaringClass();
- String newVarName = allocateNewVariable(declaringClass, "val$this"); //$NON-NLS-1$
+ String newVarName = new String(LOCAL_VAR_PREFIX) + allocateNewVariable(declaringClass, "this"); //$NON-NLS-1$
binder.bindThis(declaringClass, newVarName);
// buffer.append("this."); //$NON-NLS-1$
buffer.append(newVarName);
@@ -1799,7 +1799,7 @@
public boolean visit(ThisExpression node) {
ITypeBinding thisType = node.resolveTypeBinding();
- String newVarName = allocateNewVariable(thisType, "val$this"); //$NON-NLS-1$
+ String newVarName = new String(LOCAL_VAR_PREFIX) + allocateNewVariable(thisType, "this"); //$NON-NLS-1$
binder.bindThis(thisType, newVarName);
// buffer.append("this."); //$NON-NLS-1$
buffer.append(newVarName);