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
This commit is contained in:
jwang36 2006-08-09 04:56:49 +00:00
parent 205437772a
commit 19d66cd590
1 changed files with 11 additions and 16 deletions

View File

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