Fix VM.getSavedProperty('os.name') not supported#577
Open
HritikRaj2 wants to merge 1 commit into
Open
Conversation
- Add 'os.name' to system properties list in JPF_java_lang_System.java - Implement jdk.internal.misc.VM class with native methods - Add VM peer with saved property management in JPF_jdk_internal_misc_VM.java - Initialize VM saved properties from system properties during VM init - Add compilation exports for examples in source-sets.gradle - Include test case VMPropertyTest.java to verify functionality Resolves GitHub issue javapathfinder#495
cyrille-artho
requested changes
Dec 2, 2025
Member
cyrille-artho
left a comment
There was a problem hiding this comment.
Thank you for your effort. Your changes look good, aside minor formatting issues.
Unfortunately, several unit tests now fail. Please look into that.
Perhaps we can include a subset of your changes so the unit tests still pass and work on other features later.
| ] | ||
| compileExamplesJava.options.compilerArgs += [ | ||
| '--add-exports', 'java.base/jdk.internal.misc=ALL-UNNAMED' | ||
| ] No newline at end of file |
Member
There was a problem hiding this comment.
Please keep the newline character at the end of the file.
| // <2do> - most if this isn't supported yet | ||
| SharedSecrets.setJavaLangAccess( createJavaLangAccess()); | ||
|
|
||
Member
There was a problem hiding this comment.
Revert this change (whitespace) so we can merge this change more easily with other branches in the future.
| static { | ||
| initialize(); | ||
| } | ||
| } No newline at end of file |
| public static void main(String[] args) { | ||
| System.out.println(jdk.internal.misc.VM.getSavedProperty("os.name")); | ||
| } | ||
| } No newline at end of file |
| @@ -0,0 +1 @@ | |||
| target=VMPropertyTest No newline at end of file | |||
| return (value != null) ? env.newString(value) : MJIEnv.NULL; | ||
| } | ||
|
|
||
| @MJI |
Member
There was a problem hiding this comment.
Please revert this change (which only reformats code) as to facilitate merging code with other branches.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves GitHub issue #495