diff --git a/Tools/Source/GenBuild/org/tianocore/build/autogen/AutoGen.java b/Tools/Source/GenBuild/org/tianocore/build/autogen/AutoGen.java index e36945501b..3547808ccb 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/autogen/AutoGen.java +++ b/Tools/Source/GenBuild/org/tianocore/build/autogen/AutoGen.java @@ -1990,14 +1990,12 @@ public class AutoGen { // Count = 0; if (exitBootList != null) { - if (setVirtualList != null) { - for (i = 0; i < exitBootList.length; i++) { - if (exitBootList[i].equalsIgnoreCase("")) { - break; - } + for (i = 0; i < exitBootList.length; i++) { + if (exitBootList[i].equalsIgnoreCase("")) { + break; } - Count = i; } + Count = i; } fileBuffer.append(Integer.toString(Count)); fileBuffer.append(";\r\n\r\n"); diff --git a/Tools/Source/GenBuild/org/tianocore/build/autogen/CommonDefinition.java b/Tools/Source/GenBuild/org/tianocore/build/autogen/CommonDefinition.java index 5f83e4d9df..c6bf678e0b 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/autogen/CommonDefinition.java +++ b/Tools/Source/GenBuild/org/tianocore/build/autogen/CommonDefinition.java @@ -17,6 +17,7 @@ package org.tianocore.build.autogen; import java.util.HashSet; import java.util.Iterator; +import java.util.LinkedHashSet; import java.util.Set; /** @@ -332,7 +333,7 @@ public class CommonDefinition { * @return String[] String list which remove the duplicate string. */ public static String[] remDupString (String[] orgList){ - Set strList = new HashSet(); + Set strList = new LinkedHashSet(); String[] desList ; if (orgList == null){ return new String[0];