Bug 318333 - equals compares objects of different types
equals compares objects of different types
Status: VERIFIED FIXED
Product: JDT
Classification: Eclipse
Component: Debug
3.6
PC Windows XP
: P3 normal (vote)
: 3.6.1
Assigned To: JDT-Debug-Inbox CLA Friend
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2010-06-29 10:28 EDT by Darin Wright CLA Friend
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 Friend 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 Friend 2010-06-29 16:11:42 EDT
Fixed in HEAD.
Comment 2 Darin Wright CLA Friend 2010-07-15 11:52:05 EDT
Also fixed in 3.6.1
Comment 3 Dani Megert CLA Friend 2010-08-27 03:56:04 EDT
Verified in M20100825-0800.