1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-24 01:15:29 +02:00

Bug 261287 - Includes Grouping can get confused

This commit is contained in:
Anton Leherbauer 2009-01-23 08:38:10 +00:00
parent cbcbc74c30
commit 23d43b4d7d

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2006 QNX Software Systems and others.
* Copyright (c) 2000, 2008 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -76,9 +76,24 @@ public class IncludeReferenceProxy extends CElementGrouping {
*/
@Override
public boolean equals(Object obj) {
return reference.equals(obj);
if (this == obj) {
return true;
}
if (!(obj instanceof IncludeReferenceProxy)) {
return false;
}
IncludeReferenceProxy other = (IncludeReferenceProxy) obj;
return reference.equals(other.reference);
}
/*
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
return reference.hashCode();
}
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/