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
This commit is contained in:
wuyizhong 2006-09-26 03:10:34 +00:00
parent 8d6ff4155f
commit f6390d375c
1 changed files with 6 additions and 3 deletions

View File

@ -283,17 +283,20 @@ public class FpdParserTask extends Task {
Set<FpdModuleIdentification> filesSet = fvs.get(validFv[i]); Set<FpdModuleIdentification> filesSet = fvs.get(validFv[i]);
FpdModuleIdentification[] files = null; FpdModuleIdentification[] files = null;
if (moduleSeqSet == null) { if (moduleSeqSet == null) {
if (filesSet != null) { if (filesSet != null) {
files = filesSet.toArray(new FpdModuleIdentification[filesSet.size()]); 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 { } else {
// //
// if moduleSeqSet and filesSet is inconsistent, report error // if moduleSeqSet and filesSet is inconsistent, report error
// //
if (filesSet == null && moduleSeqSet.size() != 0) { if(moduleSeqSet.size() != filesSet.size()){
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()){
throw new BuildException("Modules for FV[" + validFv[i] + "] defined in FrameworkModules and in BuildOptions.UserExtensions[@UserID='IMAGES' @Identifier='1'] are inconsistent. "); throw new BuildException("Modules for FV[" + validFv[i] + "] defined in FrameworkModules and in BuildOptions.UserExtensions[@UserID='IMAGES' @Identifier='1'] are inconsistent. ");
} else { } else {
// //