File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
closed/src/java.base/share/classes/openj9/internal/security Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -191,11 +191,20 @@ private static boolean isJarVerifierInStackTrace() {
191
191
* extending profiles, instead of altering them, a digest of the profile
192
192
* is calculated and compared to the expected value.
193
193
*/
194
+ @ SuppressWarnings ("removal" )
194
195
private static void checkHashValues () {
195
196
ProfileParser parser = profileParser ;
196
- if ((parser != null ) && !isJarVerifierInStackTrace ()) {
197
- profileParser = null ;
198
- parser .checkHashValues ();
197
+ if (parser != null ) {
198
+ boolean isVerifying ;
199
+ if (System .getSecurityManager () == null ) {
200
+ isVerifying = isJarVerifierInStackTrace ();
201
+ } else {
202
+ isVerifying = AccessController .doPrivileged ((PrivilegedAction <Boolean >)(() -> isJarVerifierInStackTrace ()));
203
+ }
204
+ if (!isVerifying ) {
205
+ profileParser = null ;
206
+ parser .checkHashValues ();
207
+ }
199
208
}
200
209
}
201
210
You can’t perform that action at this time.
0 commit comments