Add one more judgement for modulelist specified but empty.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1624 6f19259b-4bc3-4df7-8a09-765794883524
diff --git a/Tools/Source/GenBuild/org/tianocore/build/fpd/FpdParserTask.java b/Tools/Source/GenBuild/org/tianocore/build/fpd/FpdParserTask.java
index 106e6d6..b496e32 100644
--- a/Tools/Source/GenBuild/org/tianocore/build/fpd/FpdParserTask.java
+++ b/Tools/Source/GenBuild/org/tianocore/build/fpd/FpdParserTask.java
@@ -283,17 +283,20 @@
Set<FpdModuleIdentification> filesSet = fvs.get(validFv[i]);
FpdModuleIdentification[] files = null;
+
if (moduleSeqSet == null) {
if (filesSet != null) {
files = filesSet.toArray(new FpdModuleIdentification[filesSet.size()]);
}
+ } else if (filesSet == null) {
+ if (moduleSeqSet.size() != 0) {
+ throw new BuildException("Can not find any modules belongs to FV[" + validFv[i] + "], but listed some in BuildOptions.UserExtensions[@UserID='IMAGES' @Identifier='1']");
+ }
} else {
//
// if moduleSeqSet and filesSet is inconsistent, report error
//
- if (filesSet == null && moduleSeqSet.size() != 0) {
- throw new BuildException("Can not find any modules belongs to FV[" + validFv[i] + "], but listed some in BuildOptions.UserExtensions[@UserID='IMAGES' @Identifier='1']");
- } else if(moduleSeqSet.size() != filesSet.size()){
+ if(moduleSeqSet.size() != filesSet.size()){
throw new BuildException("Modules for FV[" + validFv[i] + "] defined in FrameworkModules and in BuildOptions.UserExtensions[@UserID='IMAGES' @Identifier='1'] are inconsistent. ");
} else {
//