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 adb5a2969 royaleunit-ant-tasks: when checking for AIR version, ignore
JAVA_TOOL_OPTIONS and JDK_JAVA_OPTIONS output
adb5a2969 is described below
commit adb5a29699b41d9520dfb6660b5b7413ed87df16
Author: Josh Tynjala <[email protected]>
AuthorDate: Wed Jun 3 12:16:39 2026 -0700
royaleunit-ant-tasks: when checking for AIR version, ignore
JAVA_TOOL_OPTIONS and JDK_JAVA_OPTIONS output
---
RELEASE_NOTES.md | 1 +
.../test/ant/launcher/commands/player/AdlCommand.java | 13 +++++++++++++
2 files changed, 14 insertions(+)
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index 05d4a0427..c94e92bfd 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -116,6 +116,7 @@ Apache Royale Compiler 1.0.0
- linter: Optimized performance of finding nearest token to location by using
binary search.
- royaleunit: Detect ADL and ADT using `AIR_HOME` environment variable, if not
found in `ROYALE_HOME`.
- royaleunit: Fixed detection of Adobe AIR version when major version has two
digits.
+- royaleunit: Fixed detection of Adobe AIR version when `JDK_JAVA_OPTIONS` or
`JAVA_TOOL_OPTIONS` environment variables are set.
Apache Royale Compiler 0.9.12
=============================
diff --git
a/royaleunit-ant-tasks/src/main/java/org/apache/royale/test/ant/launcher/commands/player/AdlCommand.java
b/royaleunit-ant-tasks/src/main/java/org/apache/royale/test/ant/launcher/commands/player/AdlCommand.java
index 269165b1e..6c042b5ae 100644
---
a/royaleunit-ant-tasks/src/main/java/org/apache/royale/test/ant/launcher/commands/player/AdlCommand.java
+++
b/royaleunit-ant-tasks/src/main/java/org/apache/royale/test/ant/launcher/commands/player/AdlCommand.java
@@ -136,6 +136,19 @@ public class AdlCommand extends DefaultPlayerCommand
private double parseAdtVersionNumber( String versionString )
{
+ // if certain environment variables are set, a message like one of the
+ // following may appear in the output, and the line should be skipped.
+ // 'NOTE: Picked up JDK_JAVA_OPTIONS:'
+ // or
+ // 'Picked up JAVA_TOOL_OPTIONS:'
+ int pickedIndex = versionString.indexOf("Picked up");
+ while (pickedIndex != -1)
+ {
+ int newLineIndex = versionString.indexOf("\n", pickedIndex);
+ versionString = versionString.substring(newLineIndex + 1).trim();
+ pickedIndex = versionString.indexOf("Picked up");
+ }
+
double version;
//AIR 2.6 and greater only returns the version number.