1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Fix for bug 208577

This commit is contained in:
Jason Montojo 2007-11-02 17:10:19 +00:00
parent 93fb4901f6
commit 8b676319be

View file

@ -8,9 +8,13 @@
* Contributors: * Contributors:
* QNX Software Systems - Initial API and implementation * QNX Software Systems - Initial API and implementation
* Anton Leherbauer (Wind River Systems) * Anton Leherbauer (Wind River Systems)
* IBM Corporation
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.internal.core.model; package org.eclipse.cdt.internal.core.model;
import java.util.HashSet;
import java.util.Set;
import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Path;
@ -91,15 +95,17 @@ public abstract class APathEntry extends PathEntry {
if (otherExcludes.length != excludeLength) { if (otherExcludes.length != excludeLength) {
return false; return false;
} }
Set excludeSet = new HashSet();
Set otherSet = new HashSet();
for (int i = 0; i < excludeLength; i++) { for (int i = 0; i < excludeLength; i++) {
if (exclusionPatterns[i] != otherExcludes[i]) { // compare toStrings instead of IPaths
// compare toStrings instead of IPaths // since IPath.equals is specified to ignore trailing separators
// since IPath.equals is specified to ignore trailing separators excludeSet.add(exclusionPatterns[i].toString());
String myPattern = exclusionPatterns[i].toString(); otherSet.add(otherExcludes[i].toString());
if (!myPattern.equals(otherExcludes[i].toString())) { }
return false; if (!excludeSet.equals(otherSet)) {
} return false;
}
} }
} }
IPath otherBasePath = otherEntry.getBasePath(); IPath otherBasePath = otherEntry.getBasePath();