flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erikdebr...@apache.org
Subject git commit: [flex-falcon] [refs/heads/develop] - FLEX-33713: An NPE is thrown by this code when compiling 'spark.swc' from the SDK. The null check bypasses the issue, it doesn't do anything to fix the root cause...
Date Mon, 23 Sep 2013 13:23:55 GMT
Updated Branches:
  refs/heads/develop f7956f9a4 -> 78cbff9f0


FLEX-33713: An NPE is thrown by this code when compiling 'spark.swc' from the SDK. The null
check bypasses the issue, it doesn't do anything to fix the root cause...

Signed-off-by: Erik de Bruin <erik@ixsoftware.nl>


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/78cbff9f
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/78cbff9f
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/78cbff9f

Branch: refs/heads/develop
Commit: 78cbff9f0342e2de9f28abb88dab6c656e061e95
Parents: f7956f9
Author: Erik de Bruin <erik@ixsoftware.nl>
Authored: Mon Sep 23 15:22:03 2013 +0200
Committer: Erik de Bruin <erik@ixsoftware.nl>
Committed: Mon Sep 23 15:22:03 2013 +0200

----------------------------------------------------------------------
 .../as/codegen/ClassDirectiveProcessor.java         | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/78cbff9f/compiler/src/org/apache/flex/compiler/internal/as/codegen/ClassDirectiveProcessor.java
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/internal/as/codegen/ClassDirectiveProcessor.java
b/compiler/src/org/apache/flex/compiler/internal/as/codegen/ClassDirectiveProcessor.java
index dae7ebc..29d2a7b 100644
--- a/compiler/src/org/apache/flex/compiler/internal/as/codegen/ClassDirectiveProcessor.java
+++ b/compiler/src/org/apache/flex/compiler/internal/as/codegen/ClassDirectiveProcessor.java
@@ -533,9 +533,19 @@ class ClassDirectiveProcessor extends DirectiveProcessor
 
             cinit_insns.addInstruction(OP_returnvoid);
 
-            this.classStaticScope.methodBodyVisitor.visitInstructionList(cinit_insns);
-            this.classStaticScope.methodBodyVisitor.visitEnd();
-            this.classStaticScope.methodVisitor.visitEnd();
+            /*
+             * FIXME: NPE while compiling 'spark.swc'
+             * 
+             * erikdebruin: I'm just bypassing that with this null check. Someone 
+             *              who knows what's going on here should probably take a
+             *              look WHY this was failing...
+             */
+            if (this.classStaticScope.methodBodyVisitor != null)
+            {
+                this.classStaticScope.methodBodyVisitor.visitInstructionList(cinit_insns);
+                this.classStaticScope.methodBodyVisitor.visitEnd();
+                this.classStaticScope.methodVisitor.visitEnd();
+            }
         }
         else
         {


Mime
View raw message