From 19d66cd590564c4cf7b0ed39d1bf262cdb14cfe2 Mon Sep 17 00:00:00 2001 From: jwang36 Date: Wed, 9 Aug 2006 04:56:49 +0000 Subject: [PATCH] Fixed EDKT163. Added code to assign "arch" to null when no "SupArchList" is specified and made several format clean. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1222 6f19259b-4bc3-4df7-8a09-765794883524 --- .../build/global/SurfaceAreaQuery.java | 27 ++++++++----------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/Tools/Source/GenBuild/org/tianocore/build/global/SurfaceAreaQuery.java b/Tools/Source/GenBuild/org/tianocore/build/global/SurfaceAreaQuery.java index d5683a0daa..dbcc12772c 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/global/SurfaceAreaQuery.java +++ b/Tools/Source/GenBuild/org/tianocore/build/global/SurfaceAreaQuery.java @@ -1304,26 +1304,24 @@ public class SurfaceAreaQuery { ObjectMap.put("Libraries", moduleSA.getLibraries()); } if (((ModuleSADocument.ModuleSA) result[i]).getPcdBuildDefinition() != null) { - ObjectMap.put("PcdBuildDefinition", moduleSA - .getPcdBuildDefinition()); + ObjectMap.put("PcdBuildDefinition", moduleSA.getPcdBuildDefinition()); } - if (((ModuleSADocument.ModuleSA) result[i]) - .getModuleSaBuildOptions() != null) { - ObjectMap.put("ModuleSaBuildOptions", moduleSA - .getModuleSaBuildOptions()); + if (((ModuleSADocument.ModuleSA) result[i]).getModuleSaBuildOptions() != null) { + ObjectMap.put("ModuleSaBuildOptions", moduleSA.getModuleSaBuildOptions()); } // // Get Fpd SA Module attribute and create FpdMoudleIdentification. // - if (moduleSA.getSupArchList() != null) { + if (moduleSA.isSetSupArchList()) { arch = moduleSA.getSupArchList().toString(); + } else { + arch = null; } // TBD fvBinding = null; - saVersion = ((ModuleSADocument.ModuleSA) result[i]) - .getModuleVersion(); + saVersion = ((ModuleSADocument.ModuleSA) result[i]).getModuleVersion(); saGuid = moduleSA.getModuleGuid(); pkgGuid = moduleSA.getPackageGuid(); @@ -1333,10 +1331,8 @@ public class SurfaceAreaQuery { // Create Module Identification which have class member of package // identification. // - PackageIdentification pkgId = new PackageIdentification(null, - pkgGuid, pkgVersion); - ModuleIdentification saId = new ModuleIdentification(null, saGuid, - saVersion); + PackageIdentification pkgId = new PackageIdentification(null, pkgGuid, pkgVersion); + ModuleIdentification saId = new ModuleIdentification(null, saGuid, saVersion); saId.setPackage(pkgId); @@ -1347,12 +1343,11 @@ public class SurfaceAreaQuery { String[] archList = new String[0]; if (arch == null || arch.trim().length() == 0) { archList = GlobalData.getToolChainInfo().getArchs(); - } - else{ + } else { archList = arch.split(" "); } for (int j = 0; j < archList.length; j++) { - FpdModuleIdentification fpdSaId = new FpdModuleIdentification(saId, archList[j]); + FpdModuleIdentification fpdSaId = new FpdModuleIdentification(saId, archList[j]); if (fvBinding != null) { fpdSaId.setFvBinding(fvBinding);