mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 18:26:01 +02:00
fix the equals().
This commit is contained in:
parent
aacea7223c
commit
d53fd678c2
1 changed files with 4 additions and 0 deletions
|
@ -179,6 +179,10 @@ public abstract class CElement extends PlatformObject implements ICElement {
|
||||||
return true;
|
return true;
|
||||||
if (o instanceof CElement) {
|
if (o instanceof CElement) {
|
||||||
CElement other = (CElement) o;
|
CElement other = (CElement) o;
|
||||||
|
if( fName == null || other.fName == null )
|
||||||
|
return false;
|
||||||
|
if( fName.length() == 0 || other.fName.length() == 0 )
|
||||||
|
return false;
|
||||||
if (fType != other.fType)
|
if (fType != other.fType)
|
||||||
return false;
|
return false;
|
||||||
if (other.fName != null && fName.equals(other.fName)) {
|
if (other.fName != null && fName.equals(other.fName)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue