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 f943136f8aed29f005c85ccaf9b7c69c51c26ebe
Author: Josh Tynjala <[email protected]>
AuthorDate: Tue May 28 14:02:02 2024 -0700

    compiler: fix ArrayStoreException for unexpected attributes on <fx:Array> 
and <fx:Vector>
---
 RELEASE_NOTES.md                                                        | 1 +
 .../org/apache/royale/compiler/internal/tree/mxml/MXMLArrayNode.java    | 2 +-
 .../org/apache/royale/compiler/internal/tree/mxml/MXMLVectorNode.java   | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index a0bf021e4..d0a768eb1 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -37,6 +37,7 @@ Apache Royale Compiler 0.9.11
 - compiler: Fix null pointer exception when omitting quoted `<fx:Style>` value 
for `source` attribute.
 - compiler: Fix null pointer exception when omitting quoted `<fx:Binding>` 
value for `source`, `destination`, and `twoWay` attributes.
 - compiler: Fix missing problem for invalid `twoWay` value for `<fx:Binding>` 
tag.
+- compiler: Fix exception for unexpected attributes added to `<fx:Array>` and 
`<fx:Vector>` tags.
 - compiler: Changed to better problem message when MXML `implements` attribute 
is empty.
 - debugger: Fix exception when evaluating certain expressions at run-time.
 - formatter: Added `insert-new-line-else` configuration option.
diff --git 
a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLArrayNode.java
 
b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLArrayNode.java
index 693028131..919a61364 100644
--- 
a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLArrayNode.java
+++ 
b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLArrayNode.java
@@ -187,7 +187,7 @@ class MXMLArrayNode extends MXMLInstanceNode implements 
IMXMLArrayNode
         // Process fragments gathered since the last child tag.
         processFragments(builder, info);
 
-        setChildren(info.getChildNodeList().toArray(new MXMLInstanceNode[0]));
+        setChildren(info.getChildNodeList().toArray(new IMXMLNode[0]));
     }
 
     private void processFragments(MXMLTreeBuilder builder, MXMLNodeInfo info)
diff --git 
a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLVectorNode.java
 
b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLVectorNode.java
index b072549c0..82b417bd8 100644
--- 
a/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLVectorNode.java
+++ 
b/compiler/src/main/java/org/apache/royale/compiler/internal/tree/mxml/MXMLVectorNode.java
@@ -284,7 +284,7 @@ class MXMLVectorNode extends MXMLInstanceNode implements 
IMXMLVectorNode
     protected void initializationComplete(MXMLTreeBuilder builder, 
IMXMLTagData tag,
                                           MXMLNodeInfo info)
     {
-        setChildren(info.getChildNodeList().toArray(new MXMLInstanceNode[0]));
+        setChildren(info.getChildNodeList().toArray(new IMXMLNode[0]));
 
         // 'type' is a required attribute, and it makes this MXML compilation 
unit
         // dependent on the compilation unit for the class or interface 
specified by 'type'.

Reply via email to