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 ed5b2af43 JSRoyaleEmitter: fixed null exception when emitting embedded
plain text strings
ed5b2af43 is described below
commit ed5b2af43f66bd0fce017af7598d8bcebf8095e8
Author: Josh Tynjala <[email protected]>
AuthorDate: Mon Jul 13 13:42:15 2026 -0700
JSRoyaleEmitter: fixed null exception when emitting embedded plain text
strings
---
RELEASE_NOTES.md | 1 +
.../royale/compiler/internal/codegen/js/royale/JSRoyaleEmitter.java | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index e72b3436c..86a59957c 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -89,6 +89,7 @@ Apache Royale Compiler 1.0.0
- compiler: Fixed lost typing information in method bodies when emitting
JavaScript in some circumstances.
- compiler: Fixed missing symbols specified with `-includes` compiler option
in generated JS.
- compiler: Fixed missing "Generated byte code contains an operand stack
underflow" error when warnings are reported without other errors.
+- compiler: Fixed null exception when emitting embedded plain text to JS.
- debugger: Added missing isolate ID to SWF load and unload events.
- debugger: Fixed debugger targeting the current JDK version instead of the
intended minimum JDK version.
- debugger: Fixed localized messages appearing as unprocessed tokens.
diff --git
a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleEmitter.java
b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleEmitter.java
index da2521488..f3b4b4dc1 100644
---
a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleEmitter.java
+++
b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleEmitter.java
@@ -1332,11 +1332,12 @@ public class JSRoyaleEmitter extends JSEmitter
implements IJSRoyaleEmitter
// Embed node seems to not have location, so use parent.
EmbedData data = new EmbedData(node.getParent().getSourcePath(), null);
boolean hadError = false;
+ ICompilerProject project = getWalker().getProject();
for (IMetaTagAttribute attribute : node.getAttributes())
{
String key = attribute.getKey();
String value = attribute.getValue();
- if (data.addAttribute((CompilerProject) project, node.getParent(),
key, value, getProblems()))
+ if (data.addAttribute(project, node.getParent(), key, value,
getProblems()))
{
hadError = true;
}