Fixed the fake circular denpendency of library instance.
authorjwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 23 Jan 2007 09:48:03 +0000 (09:48 +0000)
committerjwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 23 Jan 2007 09:48:03 +0000 (09:48 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2285 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Java/Source/GenBuild/org/tianocore/build/autogen/AutogenLibOrder.java

index ca415da..7e87e28 100644 (file)
@@ -91,7 +91,7 @@ public class AutogenLibOrder {
             // Create library class consume database.\r
             //\r
             libClassConsmList = saq.getLibraryClasses(CommonDefinition.ALWAYSCONSUMED, arch, null);\r
             // Create library class consume database.\r
             //\r
             libClassConsmList = saq.getLibraryClasses(CommonDefinition.ALWAYSCONSUMED, arch, null);\r
-            if (libClassConsmList.length > 0) {\r
+            if (libClassConsmList != null) {\r
                 if (this.libInstanceConsumes.containsKey(libInstance)) {\r
                     throw new AutoGenException(\r
                             libraryList[i].getName()\r
                 if (this.libInstanceConsumes.containsKey(libInstance)) {\r
                     throw new AutoGenException(\r
                             libraryList[i].getName()\r
@@ -105,7 +105,7 @@ public class AutogenLibOrder {
             // Create library class implementer database\r
             //\r
             libClassDeclList = saq.getLibraryClasses(CommonDefinition.ALWAYSPRODUCED, arch, null);\r
             // Create library class implementer database\r
             //\r
             libClassDeclList = saq.getLibraryClasses(CommonDefinition.ALWAYSPRODUCED, arch, null);\r
-            if (libClassDeclList.length > 0) {\r
+            if (libClassDeclList != null) {\r
                 this.libInstanceProduces.put(libInstance, libClassDeclList);\r
                 for (int j = 0; j < libClassDeclList.length; j++) {\r
                     if (this.libClassProducer.containsKey(libClassDeclList[j])) {\r
                 this.libInstanceProduces.put(libInstance, libClassDeclList);\r
                 for (int j = 0; j < libClassDeclList.length; j++) {\r
                     if (this.libClassProducer.containsKey(libClassDeclList[j])) {\r
@@ -132,9 +132,6 @@ public class AutogenLibOrder {
             for (int k = 0; k < libraryList.length; ++k) {\r
                 ModuleIdentification consumer = libraryList[k];\r
                 String[] consumedClassList = libInstanceConsumes.get(consumer);\r
             for (int k = 0; k < libraryList.length; ++k) {\r
                 ModuleIdentification consumer = libraryList[k];\r
                 String[] consumedClassList = libInstanceConsumes.get(consumer);\r
-                if (consumedClassList == null) {\r
-                    continue;\r
-                }\r
 \r
                 for (int l = 0; l < consumedClassList.length; ++l) {\r
                     if (consumedClassList[l].equals(className)) {\r
 \r
                 for (int l = 0; l < consumedClassList.length; ++l) {\r
                     if (consumedClassList[l].equals(className)) {\r
@@ -171,9 +168,6 @@ public class AutogenLibOrder {
             orderList.addFirst(n);\r
 \r
             String[] consumedClassList = libInstanceConsumes.get(n);\r
             orderList.addFirst(n);\r
 \r
             String[] consumedClassList = libInstanceConsumes.get(n);\r
-            if (consumedClassList == null) {\r
-                continue;\r
-            }\r
             for (int i = 0; i < consumedClassList.length; ++i) {\r
                 ModuleIdentification m = libClassProducer.get(consumedClassList[i]);\r
                 if (m == null) {\r
             for (int i = 0; i < consumedClassList.length; ++i) {\r
                 ModuleIdentification m = libClassProducer.get(consumedClassList[i]);\r
                 if (m == null) {\r