This is an automated email from the ASF dual-hosted git repository.
gregdove 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 6f76b72 Fix for error if <fx:Metadata/> tag is empty or effectively
empty (contains commented our tags)
6f76b72 is described below
commit 6f76b723fd8ab933d1f2091deb7321dd3a7c88f7
Author: greg-dove <[email protected]>
AuthorDate: Thu Aug 15 12:08:05 2019 +1200
Fix for error if <fx:Metadata/> tag is empty or effectively empty (contains
commented our tags)
---
.../internal/codegen/mxml/royale/MXMLRoyaleEmitter.java | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git
a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyaleEmitter.java
b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyaleEmitter.java
index f5e7cba..3dc1a2c 100644
---
a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyaleEmitter.java
+++
b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyaleEmitter.java
@@ -1212,10 +1212,13 @@ public class MXMLRoyaleEmitter extends MXMLEmitter
implements
for (IMXMLMetadataNode metadataTag : metadataNodes)
{
IMetaTagNode[] tags = metadataTag.getMetaTagNodes();
- for (IMetaTagNode tag : tags)
- {
- metadataTagNodes.add(tag);
- }
+ //tags (MetaTagNodes) can be null if the parent node is empty
(or content is commented out)
+ if (tags != null) {
+ for (IMetaTagNode tag : tags)
+ {
+ metadataTagNodes.add(tag);
+ }
+ }
}
IMetaTagNode[] metaDataTags = new
IMetaTagNode[metadataTagNodes.size()];