Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 318333 - equals compares objects of different types
Summary: equals compares objects of different types
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.6.1   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-29 10:28 EDT by Darin Wright CLA
Modified: 2010-08-27 03:56 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.