Fixed EDKT163. Added code to assign "arch" to null when no "SupArchList" is specified...
authorjwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 9 Aug 2006 04:56:49 +0000 (04:56 +0000)
committerjwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 9 Aug 2006 04:56:49 +0000 (04:56 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1222 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Source/GenBuild/org/tianocore/build/global/SurfaceAreaQuery.java

index d5683a0..dbcc127 100644 (file)
@@ -1304,26 +1304,24 @@ public class SurfaceAreaQuery {
                 ObjectMap.put("Libraries", moduleSA.getLibraries());\r
             }\r
             if (((ModuleSADocument.ModuleSA) result[i]).getPcdBuildDefinition() != null) {\r
-                ObjectMap.put("PcdBuildDefinition", moduleSA\r
-                        .getPcdBuildDefinition());\r
+                ObjectMap.put("PcdBuildDefinition", moduleSA.getPcdBuildDefinition());\r
             }\r
-            if (((ModuleSADocument.ModuleSA) result[i])\r
-                    .getModuleSaBuildOptions() != null) {\r
-                ObjectMap.put("ModuleSaBuildOptions", moduleSA\r
-                        .getModuleSaBuildOptions());\r
+            if (((ModuleSADocument.ModuleSA) result[i]).getModuleSaBuildOptions() != null) {\r
+                ObjectMap.put("ModuleSaBuildOptions", moduleSA.getModuleSaBuildOptions());\r
             }\r
 \r
             //\r
             // Get Fpd SA Module attribute and create FpdMoudleIdentification.\r
             //\r
-            if (moduleSA.getSupArchList() != null) {\r
+            if (moduleSA.isSetSupArchList()) {\r
                 arch = moduleSA.getSupArchList().toString();\r
+            } else {\r
+                arch = null;\r
             }\r
 \r
             // TBD\r
             fvBinding = null;\r
-            saVersion = ((ModuleSADocument.ModuleSA) result[i])\r
-                    .getModuleVersion();\r
+            saVersion = ((ModuleSADocument.ModuleSA) result[i]).getModuleVersion();\r
 \r
             saGuid = moduleSA.getModuleGuid();\r
             pkgGuid = moduleSA.getPackageGuid();\r
@@ -1333,10 +1331,8 @@ public class SurfaceAreaQuery {
             // Create Module Identification which have class member of package\r
             // identification.\r
             //\r
-            PackageIdentification pkgId = new PackageIdentification(null,\r
-                    pkgGuid, pkgVersion);\r
-            ModuleIdentification saId = new ModuleIdentification(null, saGuid,\r
-                    saVersion);\r
+            PackageIdentification pkgId = new PackageIdentification(null, pkgGuid, pkgVersion);\r
+            ModuleIdentification saId = new ModuleIdentification(null, saGuid, saVersion);\r
 \r
             saId.setPackage(pkgId);\r
 \r
@@ -1347,12 +1343,11 @@ public class SurfaceAreaQuery {
             String[] archList = new String[0];\r
             if (arch == null || arch.trim().length() == 0) {\r
                 archList = GlobalData.getToolChainInfo().getArchs();\r
-            }\r
-            else{\r
+            } else {\r
                 archList = arch.split(" ");\r
             }\r
             for (int j = 0; j < archList.length; j++) {\r
-                FpdModuleIdentification fpdSaId = new FpdModuleIdentification(saId,    archList[j]);\r
+                FpdModuleIdentification fpdSaId = new FpdModuleIdentification(saId, archList[j]);\r
     \r
                 if (fvBinding != null) {\r
                     fpdSaId.setFvBinding(fvBinding);\r