check for duplicate classpath entries (part of FELIX-2575)


git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@992235 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/sigil/common/core/src/org/apache/felix/sigil/common/core/internal/model/eclipse/SigilBundle.java b/sigil/common/core/src/org/apache/felix/sigil/common/core/internal/model/eclipse/SigilBundle.java
index 11d7053..6390495 100644
--- a/sigil/common/core/src/org/apache/felix/sigil/common/core/internal/model/eclipse/SigilBundle.java
+++ b/sigil/common/core/src/org/apache/felix/sigil/common/core/internal/model/eclipse/SigilBundle.java
@@ -255,9 +255,12 @@
 
     public void addClasspathEntry(String encodedClasspath)
     {
+        encodedClasspath = encodedClasspath.trim();
         ArrayList<String> tmp = new ArrayList<String>(getClasspathEntrys());
-        tmp.add(encodedClasspath.trim());
-        classpath = tmp.toArray(new String[tmp.size()]);
+        if (!tmp.contains(encodedClasspath)) {
+            tmp.add(encodedClasspath);
+            classpath = tmp.toArray(new String[tmp.size()]);
+        }
     }
 
     public Collection<String> getClasspathEntrys()