Skip to content

Use SystemAccessUtils.fileExists in loadIfExists - #1768

Merged
jasonkatonica merged 1 commit into
IBM:java11from
jasonkatonica:katonica/issue1284/fixforifexistssecmanmain-java11
Sep 10, 2026
Merged

Use SystemAccessUtils.fileExists in loadIfExists#1768
jasonkatonica merged 1 commit into
IBM:java11from
jasonkatonica:katonica/issue1284/fixforifexistssecmanmain-java11

Conversation

@jasonkatonica

Copy link
Copy Markdown
Member

Replace direct libraryFile.exists() call in loadIfExists with SystemAccessUtils.fileExists(libraryName) to ensure file existence checks are routed through the security manager aware utility method, consistent with the rest of the privileged-access pattern used in the native library loading path.

Back-ported from: #1758

Signed-off-by: Jason Katonica katonica@us.ibm.com

Replace direct `libraryFile.exists()` call in `loadIfExists` with
`SystemAccessUtils.fileExists(libraryName)` to ensure file existence
checks are routed through the security manager aware utility method,
consistent with the rest of the privileged-access pattern used in the
native library loading path.

Back-ported from: IBM#1758

Signed-off-by: Jason Katonica <katonica@us.ibm.com>

@KostasTsiounis KostasTsiounis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jasonkatonica
jasonkatonica merged commit 27a3817 into IBM:java11 Sep 10, 2026
3 checks passed
@jasonkatonica
jasonkatonica deleted the katonica/issue1284/fixforifexistssecmanmain-java11 branch September 10, 2026 19:35
jasonkatonica added a commit to ibmruntimes/OpenJCEPlus that referenced this pull request Sep 10, 2026
Replace direct `libraryFile.exists()` call in `loadIfExists` with
`SystemAccessUtils.fileExists(libraryName)` to ensure file existence
checks are routed through the security manager aware utility method,
consistent with the rest of the privileged-access pattern used in the
native library loading path.

Back-ported from: IBM#1758

Signed-off-by: Jason Katonica <katonica@us.ibm.com>
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.

3 participants