]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/LibraryClass/LibraryClassVector.java
1. Fix EDKT230 "A library class should not be specified for a module more than one...
[mirror_edk2.git] / Tools / Source / FrameworkWizard / src / org / tianocore / frameworkwizard / module / Identifications / LibraryClass / LibraryClassVector.java
index d5e22f980bab5270a91dfd77387a314d97140077..56490a284fcbb1360d1e1c01b884cd4333da4e0b 100644 (file)
@@ -21,12 +21,7 @@ public class LibraryClassVector {
     private Vector<LibraryClassIdentification> vLibraryClass = new Vector<LibraryClassIdentification>();\r
     \r
     public int findLibraryClass(LibraryClassIdentification lib) {\r
-        for (int index = 0; index < vLibraryClass.size(); index++) {\r
-            if (vLibraryClass.elementAt(index).equals(lib)) {\r
-                return index;\r
-            }\r
-        }\r
-        return -1;\r
+        return findLibraryClass(lib.getLibraryClassName());\r
     }\r
     \r
     public int findLibraryClass(String name) {\r
@@ -47,7 +42,9 @@ public class LibraryClassVector {
     }\r
     \r
     public void addLibraryClass(LibraryClassIdentification lib) {\r
-        vLibraryClass.addElement(lib);\r
+        if (findLibraryClass(lib) == -1) {\r
+            vLibraryClass.addElement(lib);\r
+        }\r
     }\r
     \r
     public void setLibraryClass(LibraryClassIdentification lib, int index) {\r