Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 277237
Collapse All | Expand All

(-)eval/org/eclipse/jdt/internal/debug/eval/ast/engine/ASTEvaluationEngine.java (-1 / +6 lines)
Lines 11-17 Link Here
11
package org.eclipse.jdt.internal.debug.eval.ast.engine;
11
package org.eclipse.jdt.internal.debug.eval.ast.engine;
12
12
13
13
14
import java.util.HashSet;
14
import java.util.Map;
15
import java.util.Map;
16
import java.util.Set;
15
import java.util.StringTokenizer;
17
import java.util.StringTokenizer;
16
import java.util.regex.Matcher;
18
import java.util.regex.Matcher;
17
import java.util.regex.Pattern;
19
import java.util.regex.Pattern;
Lines 188-200 Link Here
188
		try {
190
		try {
189
			IJavaVariable[] localsVar = context.getLocals();
191
			IJavaVariable[] localsVar = context.getLocals();
190
			int numLocalsVar= localsVar.length;
192
			int numLocalsVar= localsVar.length;
193
			Set names = new HashSet();
191
			// ******
194
			// ******
192
			// to hide problems with local variable declare as instance of Local Types
195
			// to hide problems with local variable declare as instance of Local Types
196
			// and to remove locals with duplicate names
193
			IJavaVariable[] locals= new IJavaVariable[numLocalsVar];
197
			IJavaVariable[] locals= new IJavaVariable[numLocalsVar];
194
			int numLocals= 0;
198
			int numLocals= 0;
195
			for (int i = 0; i < numLocalsVar; i++) {
199
			for (int i = 0; i < numLocalsVar; i++) {
196
				if (!isLocalType(localsVar[i].getSignature())) {
200
				if (!isLocalType(localsVar[i].getSignature()) && !names.contains(localsVar[i].getName())) {
197
					locals[numLocals++]= localsVar[i];
201
					locals[numLocals++]= localsVar[i];
202
					names.add(localsVar[i].getName());
198
				}
203
				}
199
			}
204
			}
200
			// to solve and remove
205
			// to solve and remove

Return to bug 277237