You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by jo...@apache.org on 2020/12/23 20:08:09 UTC

[royale-compiler] branch develop updated: AccessorEmitter: fix null exception when setter has custom namespace and there is no getter

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

joshtynjala 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 790d6cb  AccessorEmitter: fix null exception when setter has custom namespace and there is no getter
790d6cb is described below

commit 790d6cb0f27683832b3af8ecde7c088d4870027c
Author: Josh Tynjala <jo...@apache.org>
AuthorDate: Wed Dec 23 11:20:32 2020 -0800

    AccessorEmitter: fix null exception when setter has custom namespace and there is no getter
---
 .../apache/royale/compiler/internal/codegen/js/jx/AccessorEmitter.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/AccessorEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/AccessorEmitter.java
index f5d43e6..9ec37a7 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/AccessorEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/AccessorEmitter.java
@@ -532,7 +532,8 @@ public class AccessorEmitter extends JSSubEmitter implements
                     write(ASEmitterTokens.MEMBER_ACCESS);
                     if (p.uri != null)
                     {
-                        INamespaceDecorationNode ns = ((FunctionNode)getterNode).getActualNamespaceNode();
+                        IAccessorNode node = (getterNode != null) ? getterNode : setterNode;
+                        INamespaceDecorationNode ns = ((FunctionNode)node).getActualNamespaceNode();
                         INamespaceDefinition nsDef = (INamespaceDefinition)ns.resolve(project);
                         fjs.formatQualifiedName(nsDef.getQualifiedName()); // register with used names
                         write(JSRoyaleEmitter.formatNamespacedProperty(p.uri, baseName, false));