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

Check for JDK version while setting java.security.manager option #5205

Merged
merged 2 commits into from
Nov 10, 2022
Merged

Check for JDK version while setting java.security.manager option #5205

merged 2 commits into from
Nov 10, 2022

Conversation

adnapibar
Copy link
Contributor

Signed-off-by: Rabi Panda [email protected]

Description

This updates #5194 to check for JDK versions before setting the option.

Issues Resolved

[List any issues this PR will resolve]

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@adnapibar adnapibar requested a review from reta November 10, 2022 18:05
@adnapibar adnapibar requested a review from a team as a code owner November 10, 2022 18:05
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@peternied
Copy link
Member

peternied commented Nov 10, 2022

I'm pretty sure we need this check, seeing the following in security builds on JDK11

Error occurred during initialization of VM
java.lang.Error: Could not create SecurityManager
	at java.lang.System.initPhase3([email protected]/System.java:2065)
Caused by: java.lang.ClassNotFoundException: allow
	at jdk.internal.loader.BuiltinClassLoader.loadClass([email protected]/BuiltinClassLoader.java:581)
	at jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass([email protected]/ClassLoaders.java:178)
	at java.lang.ClassLoader.loadClass([email protected]/ClassLoader.java:522)
	at java.lang.Class.forName0([email protected]/Native Method)
	at java.lang.Class.forName([email protected]/Class.java:398)
	at java.lang.System.initPhase3([email protected]/System.java:2050)

@peternied
Copy link
Member

🤞 Go Gradle check go!

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@adnapibar adnapibar merged commit 4fc5c8d into opensearch-project:main Nov 10, 2022
reta pushed a commit to reta/OpenSearch that referenced this pull request Oct 30, 2023
reta pushed a commit to reta/OpenSearch that referenced this pull request Nov 10, 2023
reta added a commit that referenced this pull request Nov 14, 2023
* Update bundled JDK to JDK-21.0.1 (#10576)

Signed-off-by: Andriy Redko <[email protected]>
(cherry picked from commit 0d7d1e9)
Signed-off-by: Andriy Redko <[email protected]>

* Add condition to check JVM version for illegal-access switch (#5279)

This switch is removed in JDK version 17. https://openjdk.org/jeps/403

Signed-off-by: Rabi Panda <[email protected]>

* Check for JDK version while setting java.security.manager option (#5205)

Signed-off-by: Rabi Panda <[email protected]>

* Fix tests and test skaffolding

Signed-off-by: Andriy Redko <[email protected]>

---------

Signed-off-by: Andriy Redko <[email protected]>
Signed-off-by: Rabi Panda <[email protected]>
Co-authored-by: Rabi Panda <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants