1. Fix EDKT230 "A library class should not be specified for a module more than one...
authorhche10x <hche10x@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 5 Sep 2006 06:51:14 +0000 (06:51 +0000)
committerhche10x <hche10x@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 5 Sep 2006 06:51:14 +0000 (06:51 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1460 6f19259b-4bc3-4df7-8a09-765794883524

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
     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
     }\r
     \r
     public int findLibraryClass(String name) {\r
@@ -47,7 +42,9 @@ public class LibraryClassVector {
     }\r
     \r
     public void addLibraryClass(LibraryClassIdentification lib) {\r
     }\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
     }\r
     \r
     public void setLibraryClass(LibraryClassIdentification lib, int index) {\r