From 90bed2f7ff020657edd11a46f104a2a25d20749e Mon Sep 17 00:00:00 2001 From: hche10x Date: Tue, 5 Sep 2006 06:51:14 +0000 Subject: [PATCH] 1. Fix EDKT230 "A library class should not be specified for a module more than one time" git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1460 6f19259b-4bc3-4df7-8a09-765794883524 --- .../LibraryClass/LibraryClassVector.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/LibraryClass/LibraryClassVector.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/LibraryClass/LibraryClassVector.java index d5e22f980b..56490a284f 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/LibraryClass/LibraryClassVector.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/LibraryClass/LibraryClassVector.java @@ -21,12 +21,7 @@ public class LibraryClassVector { private Vector vLibraryClass = new Vector(); public int findLibraryClass(LibraryClassIdentification lib) { - for (int index = 0; index < vLibraryClass.size(); index++) { - if (vLibraryClass.elementAt(index).equals(lib)) { - return index; - } - } - return -1; + return findLibraryClass(lib.getLibraryClassName()); } public int findLibraryClass(String name) { @@ -47,7 +42,9 @@ public class LibraryClassVector { } public void addLibraryClass(LibraryClassIdentification lib) { - vLibraryClass.addElement(lib); + if (findLibraryClass(lib) == -1) { + vLibraryClass.addElement(lib); + } } public void setLibraryClass(LibraryClassIdentification lib, int index) {