Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test for parameter passing to batch -> java application #1765

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

martin-strecker-sonarsource
Copy link
Contributor

Tests for #1706
Extracted from #1751

@martin-strecker-sonarsource
Copy link
Contributor Author

martin-strecker-sonarsource commented Nov 20, 2023

There is a difference in argument handling between java versions. Locally I could reproduce this difference:
Running java.exe LogArgs "*.*" with two different "java.exe"

C:\Program Files\Common Files\Oracle\Java\javapath\java.exe --version
java 20.0.1 2023-04-18
Java(TM) SE Runtime Environment (build 20.0.1+9-29)
Java HotSpot(TM) 64-Bit Server VM (build 20.0.1+9-29, mixed mode, sharing)

produces (it basically interprets *.* as a file pattern and expands it, so the args array contains some file names of the directory)

LogArgs.class
LogArgs.java
LogArgs.log

while

C:\Program Files\Java\jdk-11.0.2\bin\java.exe --version
openjdk 11.0.2 2019-01-15
OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)

produces (passes the pattern without interpretation)

*.*

The tests as written are for the Java 20 runtime, while CI uses a different java version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant