mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-07 16:26:11 +02:00
Fix hashCode() and equals() for type-info objects.
This commit is contained in:
parent
d63c249a01
commit
1b27065ccd
1 changed files with 6 additions and 0 deletions
|
@ -531,6 +531,7 @@ public class IndexTypeInfo implements ITypeInfo, IFunctionInfo {
|
|||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + elementType;
|
||||
result = prime * result + ((fileLocal == null) ? 0 : fileLocal.hashCode());
|
||||
result = prime * result + IndexTypeInfo.hashCode(fqn);
|
||||
result = prime * result + IndexTypeInfo.hashCode(params);
|
||||
return result;
|
||||
|
@ -550,6 +551,11 @@ public class IndexTypeInfo implements ITypeInfo, IFunctionInfo {
|
|||
IndexTypeInfo other = (IndexTypeInfo) obj;
|
||||
if (elementType != other.elementType)
|
||||
return false;
|
||||
if (fileLocal == null) {
|
||||
if (other.fileLocal != null)
|
||||
return false;
|
||||
} else if (!fileLocal.equals(other.fileLocal))
|
||||
return false;
|
||||
if (!Arrays.equals(fqn, other.fqn))
|
||||
return false;
|
||||
if (!Arrays.equals(params, other.params))
|
||||
|
|
Loading…
Add table
Reference in a new issue