Community
Participate
Working Groups
build I20080603-2000 1) add the following method in DebugEvaluationTest.java public void test066() { if (this.complianceLevel < ClassFileConstants.JDK1_5) return; try { String sourceA66 = "public class A66 {\n" + "\tprivate int i;\n" + "\tpublic A66() {;\n" + "\t}\n" + "\tprivate <U> int foo(int i) {;\n" + "\t\treturn i;\n" + "\t}\n" + "\tpublic void bar() {\n" + "\t}\n" + "}"; compileAndDeploy15(sourceA66, "A66"); String userCode = "new A66().bar();"; JDIStackFrame stackFrame = new JDIStackFrame(this.jdiVM, this, userCode, "A66", "bar", -1); DebugRequestor requestor = new DebugRequestor(); char[] snippet = "return this.<Object>foo(3);".toCharArray(); try { context.evaluate( snippet, stackFrame.localVariableTypeNames(), stackFrame.localVariableNames(), stackFrame.localVariableModifiers(), stackFrame.declaringTypeName(), stackFrame.isStatic(), stackFrame.isConstructorCall(), getEnv(), getCompilerOptions(), requestor, getProblemFactory()); } catch (InstallException e) { assertTrue("No targetException " + e.getMessage(), false); } assertTrue( "Should get one result but got " + (requestor.resultIndex + 1), requestor.resultIndex == 0); EvaluationResult result = requestor.results[0]; assertTrue("Code snippet should not have problems", !result.hasProblems()); assertTrue("Result should have a value", result.hasValue()); assertEquals("Value", "3".toCharArray(), result.getValueDisplayString()); assertEquals("Type", "int".toCharArray(), result.getValueTypeName()); } finally { removeTempClass("A66"); } } 2) run this junit test The test fails If '<Object>' is removed from the snippet the test does not fail.
Created attachment 103708 [details] DebugEvaluationTest.test066()
Closing as a duplicate of bug 235783. 235783 is a more generic bug that covers this case. *** This bug has been marked as a duplicate of bug 235783 ***