You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2018/09/21 22:42:16 UTC

[royale-compiler] branch develop updated: ModuleExample was failing due to NPE

This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git


The following commit(s) were added to refs/heads/develop by this push:
     new 3349014  ModuleExample was failing due to NPE
3349014 is described below

commit 334901479c20e26c0bcec54a67b98272db5c65d9
Author: Alex Harui <ah...@apache.org>
AuthorDate: Fri Sep 21 15:42:00 2018 -0700

    ModuleExample was failing due to NPE
---
 .../compiler/utils/JSClosureCompilerWrapper.java   | 30 +++++++++++++---------
 1 file changed, 18 insertions(+), 12 deletions(-)

diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/utils/JSClosureCompilerWrapper.java b/compiler-jx/src/main/java/org/apache/royale/compiler/utils/JSClosureCompilerWrapper.java
index 3afd1d3..5437c70 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/utils/JSClosureCompilerWrapper.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/utils/JSClosureCompilerWrapper.java
@@ -177,24 +177,30 @@ public class JSClosureCompilerWrapper
         {
         	File outputFile = new File(outputFolder, variableMapOutputPath);
         	VariableMap map = CompilerMapFetcher.getVariableMap(compiler_);
-        	try {
-				map.save(outputFile.getAbsolutePath());
-			} catch (IOException e) {
-				// TODO Auto-generated catch block
-				e.printStackTrace();
-			}
+        	if (map != null)
+        	{
+	        	try {
+					map.save(outputFile.getAbsolutePath());
+				} catch (IOException e) {
+					// TODO Auto-generated catch block
+					e.printStackTrace();
+				}
+        	}
         }
         
         if (propertyMapOutputPath != null)
         {
         	File outputFile = new File(outputFolder, propertyMapOutputPath);
         	VariableMap map = CompilerMapFetcher.getPropertyMap(compiler_);
-        	try {
-				map.save(outputFile.getAbsolutePath());
-			} catch (IOException e) {
-				// TODO Auto-generated catch block
-				e.printStackTrace();
-			}
+        	if (map != null)
+        	{
+	        	try {
+					map.save(outputFile.getAbsolutePath());
+				} catch (IOException e) {
+					// TODO Auto-generated catch block
+					e.printStackTrace();
+				}
+        	}
         }
         
         /*