Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 318333

Summary: equals compares objects of different types
Product: [Eclipse Project] JDT Reporter: Darin Wright <darin.eclipse>
Component: DebugAssignee: JDT-Debug-Inbox <jdt-debug-inbox>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert
Version: 3.6   
Target Milestone: 3.6.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Darin Wright CLA 2010-06-29 10:28:12 EDT
This bug was discovered by FindBugs.

org.eclipse.jdt.internal.debug.eval.ast.engine.ASTInstructionCompiler.getTypeId(Type)

The following line compares a String to a Name, and will never return true.

if ("java.lang.String".equals(simpleType.getName())){ //$NON-NLS-1$
	return Instruction.T_String;
} 

It should be comparing to to getName().getFullyQualifiedName().
Comment 1 Darin Wright CLA 2010-06-29 16:11:42 EDT
Fixed in HEAD.
Comment 2 Darin Wright CLA 2010-07-15 11:52:05 EDT
Also fixed in 3.6.1
Comment 3 Dani Megert CLA 2010-08-27 03:56:04 EDT
Verified in M20100825-0800.