diff options
author | Jason Montojo | 2007-11-02 17:10:19 +0000 |
---|---|---|
committer | Jason Montojo | 2007-11-02 17:10:19 +0000 |
commit | 8b676319befac457aa5cc960962fdfae17338369 (patch) | |
tree | 75e9f52012d2b4ce1919a252ae14730b1cf6cdcf | |
parent | 93fb4901f6907f2fb8bd2227c0f7915f315221d2 (diff) | |
download | org.eclipse.cdt-8b676319befac457aa5cc960962fdfae17338369.tar.gz org.eclipse.cdt-8b676319befac457aa5cc960962fdfae17338369.tar.xz org.eclipse.cdt-8b676319befac457aa5cc960962fdfae17338369.zip |
Fix for bug 208577
-rw-r--r-- | core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/APathEntry.java | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/APathEntry.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/APathEntry.java index a22fc6f8737..f97838d6159 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/APathEntry.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/APathEntry.java @@ -8,9 +8,13 @@ * Contributors: * QNX Software Systems - Initial API and implementation * Anton Leherbauer (Wind River Systems) + * IBM Corporation *******************************************************************************/ 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.Path; @@ -91,15 +95,17 @@ public abstract class APathEntry extends PathEntry { if (otherExcludes.length != excludeLength) { return false; } + + Set excludeSet = new HashSet(); + Set otherSet = new HashSet(); for (int i = 0; i < excludeLength; i++) { - if (exclusionPatterns[i] != otherExcludes[i]) { - // compare toStrings instead of IPaths - // since IPath.equals is specified to ignore trailing separators - String myPattern = exclusionPatterns[i].toString(); - if (!myPattern.equals(otherExcludes[i].toString())) { - return false; - } - } + // compare toStrings instead of IPaths + // since IPath.equals is specified to ignore trailing separators + excludeSet.add(exclusionPatterns[i].toString()); + otherSet.add(otherExcludes[i].toString()); + } + if (!excludeSet.equals(otherSet)) { + return false; } } IPath otherBasePath = otherEntry.getBasePath(); |