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
commit d029edf6b8218cd521dfd21ba497b6b5743f864e Author: Josh Tynjala <joshtynj...@apache.org> AuthorDate: Fri Feb 2 14:01:12 2024 -0800 compiler: some null checks for child node URIs in RPC services --- .../apache/royale/compiler/internal/tree/mxml/MXMLHTTPServiceNode.java | 2 +- .../royale/compiler/internal/tree/mxml/MXMLRemoteObjectMethodNode.java | 2 +- .../apache/royale/compiler/internal/tree/mxml/MXMLRemoteObjectNode.java | 2 +- .../apache/royale/compiler/internal/tree/mxml/MXMLWebServiceNode.java | 2 +- .../royale/compiler/internal/tree/mxml/MXMLWebServiceOperationNode.java | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLHTTPServiceNode.java b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLHTTPServiceNode.java index afcae8d8d..30b2f10c5 100644 --- a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLHTTPServiceNode.java +++ b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLHTTPServiceNode.java @@ -75,7 +75,7 @@ class MXMLHTTPServiceNode extends MXMLInstanceNode implements IMXMLHTTPServiceNo @Override protected void processChildTag(MXMLTreeBuilder builder, IMXMLTagData tag, IMXMLTagData childTag, MXMLNodeInfo info) { - if (TAG_REQUEST.equals(childTag.getShortName()) && childTag.getURI().equals(tag.getURI())) + if (TAG_REQUEST.equals(childTag.getShortName()) && childTag.getURI() != null && childTag.getURI().equals(tag.getURI())) { final RoyaleProject project = builder.getProject(); final IClassDefinition classHTTPService = getClassReference(project); diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLRemoteObjectMethodNode.java b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLRemoteObjectMethodNode.java index 0eb9198b1..7f55d4118 100644 --- a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLRemoteObjectMethodNode.java +++ b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLRemoteObjectMethodNode.java @@ -120,7 +120,7 @@ class MXMLRemoteObjectMethodNode extends MXMLInstanceNode implements IMXMLRemote @Override protected void processChildTag(MXMLTreeBuilder builder, IMXMLTagData tag, IMXMLTagData childTag, MXMLNodeInfo info) { - if (TAG_ARGUMENTS.equals(childTag.getShortName()) && childTag.getURI().equals(tag.getURI())) + if (TAG_ARGUMENTS.equals(childTag.getShortName()) && childTag.getURI() != null && childTag.getURI().equals(tag.getURI())) { final RoyaleProject project = builder.getProject(); final IClassDefinition classOperation = getClassReference(project); diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLRemoteObjectNode.java b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLRemoteObjectNode.java index 787524451..daed68627 100644 --- a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLRemoteObjectNode.java +++ b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLRemoteObjectNode.java @@ -63,7 +63,7 @@ class MXMLRemoteObjectNode extends MXMLInstanceNode implements IMXMLRemoteObject protected void processChildTag(MXMLTreeBuilder builder, IMXMLTagData tag, IMXMLTagData childTag, MXMLNodeInfo info) { // Create MXMLRemoteObjectMethodNode for a {@code <method>} child tag. - if (TAG_METHOD.equals(childTag.getShortName()) && childTag.getURI().equals(tag.getURI())) + if (TAG_METHOD.equals(childTag.getShortName()) && childTag.getURI() != null && childTag.getURI().equals(tag.getURI())) { final RoyaleProject project = builder.getProject(); final XMLName name = new XMLName(childTag.getXMLName().getXMLNamespace(), BASENAME_REMOTE_OBJECT_METHOD); diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLWebServiceNode.java b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLWebServiceNode.java index b3560742e..b8f4ccf67 100644 --- a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLWebServiceNode.java +++ b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLWebServiceNode.java @@ -63,7 +63,7 @@ class MXMLWebServiceNode extends MXMLInstanceNode implements IMXMLWebServiceNode protected void processChildTag(MXMLTreeBuilder builder, IMXMLTagData tag, IMXMLTagData childTag, MXMLNodeInfo info) { // Create MXMLWebServiceOperationNode for an {@code <operation>} child tag. - if (TAG_OPERATION.equals(childTag.getShortName()) && childTag.getURI().equals(tag.getURI())) + if (TAG_OPERATION.equals(childTag.getShortName()) && childTag.getURI() != null && childTag.getURI().equals(tag.getURI())) { final RoyaleProject project = builder.getProject(); final XMLName name = new XMLName(childTag.getXMLName().getXMLNamespace(), BASENAME_WEB_SERVICE_OPERATION); diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLWebServiceOperationNode.java b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLWebServiceOperationNode.java index 246a8a017..ec209952f 100644 --- a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLWebServiceOperationNode.java +++ b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLWebServiceOperationNode.java @@ -122,7 +122,7 @@ class MXMLWebServiceOperationNode extends MXMLInstanceNode implements IMXMLWebSe { String childTagShortName = childTag.getShortName(); // request is just an alias for arguments - if ((TAG_ARGUMENTS.equals(childTagShortName) || TAG_REQUEST.equals(childTagShortName)) && childTag.getURI().equals(tag.getURI())) + if ((TAG_ARGUMENTS.equals(childTagShortName) || TAG_REQUEST.equals(childTagShortName)) && childTag.getURI() != null && childTag.getURI().equals(tag.getURI())) { final RoyaleProject project = builder.getProject(); final IClassDefinition classOperation = getClassReference(project);