summaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
Diffstat (limited to 'Tools')
-rw-r--r--Tools/Java/Source/GenBuild/org/tianocore/build/global/GlobalData.java10
-rw-r--r--Tools/Java/Source/GenBuild/org/tianocore/build/id/ModuleIdentification.java29
2 files changed, 30 insertions, 9 deletions
diff --git a/Tools/Java/Source/GenBuild/org/tianocore/build/global/GlobalData.java b/Tools/Java/Source/GenBuild/org/tianocore/build/global/GlobalData.java
index d339043..77beb85 100644
--- a/Tools/Java/Source/GenBuild/org/tianocore/build/global/GlobalData.java
+++ b/Tools/Java/Source/GenBuild/org/tianocore/build/global/GlobalData.java
@@ -302,19 +302,19 @@ public class GlobalData {
PackageIdentification packageId = null;
Iterator iter = packageList.iterator();
while (iter.hasNext()) {
- packageId = (PackageIdentification)iter.next();
- moduleId.setPackage(packageId);
- Spd spd = spdTable.get(packageId);
+ PackageIdentification pid = (PackageIdentification)iter.next();
+ Spd spd = spdTable.get(pid);
File tempMsaFile = null;
if ((tempMsaFile = spd.getModuleFile(moduleId)) != null ) {
if (tempMsaFile.getParent().equalsIgnoreCase(moduleId.getMsaFile().getParent())) {
+ packageId = pid;
break ;
}
tempMsaFile = null;
}
}
if (packageId == null){
- throw new EdkException("Can't find Module [" + moduleId.getName() + "] in any SPD package!");
+ throw new EdkException("Can't find Module [" + moduleId.getName() + "] in any package!");
} else {
return packageId;
}
@@ -648,7 +648,7 @@ public class GlobalData {
return moduleId;
}
}
- throw new EdkException("Can't find module GUID value " + moduleId.toGuidString() + " in " + packageId + " under the current workspace!");
+ throw new EdkException("Can't find " + moduleId + " under the current workspace!");
}
public synchronized static Set<PackageIdentification> getPackageList(){
diff --git a/Tools/Java/Source/GenBuild/org/tianocore/build/id/ModuleIdentification.java b/Tools/Java/Source/GenBuild/org/tianocore/build/id/ModuleIdentification.java
index 87024d1..c2d9acc 100644
--- a/Tools/Java/Source/GenBuild/org/tianocore/build/id/ModuleIdentification.java
+++ b/Tools/Java/Source/GenBuild/org/tianocore/build/id/ModuleIdentification.java
@@ -129,12 +129,33 @@ public class ModuleIdentification extends Identification {
}
public String toString() {
- if (version == null || version.trim().equalsIgnoreCase("")) {
- return "Module [" + name + "] in " + packageId;
+ String nameString;
+ String versionString;
+ String packageString;
+
+ if (name != null && name != "") {
+ nameString = name;
+ } else {
+ if (guid != null && guid != "") {
+ nameString = guid;
+ } else {
+ nameString = "UNKNOWN";
+ }
}
- else {
- return "Module [" + name + " " + version + "] in " + packageId;
+
+ if (version != null) {
+ versionString = version;
+ } else {
+ versionString = "";
}
+
+ if (packageId != null) {
+ packageString = packageId.toString();
+ } else {
+ packageString = "Package [UNKNOWN]";
+ }
+
+ return "Module [" + nameString + versionString + "] in " + packageString;
}
/**