do not generate version attributes when saving module order information in FV if...
[mirror_edk2.git] / Tools / Source / FrameworkWizard / src / org / tianocore / frameworkwizard / platform / ui / FpdFileContents.java
index 840f3e7700c5276faf3aac1ea7b6443ad7dcae55..6ca15710c291dc6b05879f6fad3fb533bf5c1f8c 100644 (file)
@@ -1761,9 +1761,14 @@ public class FpdFileContents {
         for (int i = 0; i < includeModules.size(); ++i) {\r
             cursor.beginElement(elementModule);\r
             cursor.insertAttributeWithValue("ModuleGuid", includeModules.get(i)[0]);\r
-            cursor.insertAttributeWithValue("ModuleVersion", includeModules.get(i)[1]);\r
+            if (!includeModules.get(i)[1].equals("null") && includeModules.get(i)[1].length() != 0) {\r
+                cursor.insertAttributeWithValue("ModuleVersion", includeModules.get(i)[1]);\r
+            }\r
             cursor.insertAttributeWithValue("PackageGuid", includeModules.get(i)[2]);\r
-            cursor.insertAttributeWithValue("PackageVersion", includeModules.get(i)[3]);\r
+            if (!includeModules.get(i)[3].equals("null") && includeModules.get(i)[3].length() != 0) {\r
+                cursor.insertAttributeWithValue("PackageVersion", includeModules.get(i)[3]);\r
+            }\r
+            \r
             cursor.insertAttributeWithValue("Arch", includeModules.get(i)[4]);\r
             cursor.toEndToken();\r
             cursor.toNextToken();\r