ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/JSR166TestCase.java
(Generate patch)

Comparing jsr166/src/test/tck/JSR166TestCase.java (file contents):
Revision 1.274 by dl, Tue Mar 22 16:26:19 2022 UTC vs.
Revision 1.275 by dl, Tue Mar 22 21:29:24 2022 UTC

# Line 413 | Line 413 | public class JSR166TestCase extends Test
413          if (useSecurityManager) {
414              System.err.println("Setting a permissive security manager");
415              Policy.setPolicy(permissivePolicy());
416 <            System.setSecurityManager(new SecurityManager());
416 >            try {
417 >                System.setSecurityManager(new SecurityManager());
418 >            } catch(Throwable ok) {  // failure OK during deprecation
419 >            }
420          }
421          for (int i = 0; i < suiteRuns; i++) {
422              TestResult result = newPithyTestRunner().doRun(suite);
# Line 1411 | Line 1414 | public class JSR166TestCase extends Test
1414                  Policy.setPolicy(permissivePolicy());
1415                  System.setSecurityManager(new SecurityManager());
1416                  runWithSecurityManagerWithPermissions(r, permissions);
1417 +            } catch (UnsupportedOperationException ok) {
1418              } finally {
1419 <                System.setSecurityManager(null);
1420 <                Policy.setPolicy(savedPolicy);
1419 >                try {
1420 >                    System.setSecurityManager(null);
1421 >                    Policy.setPolicy(savedPolicy);
1422 >                } catch (Exception ok) {
1423 >                }
1424              }
1425          } else {
1426              Policy savedPolicy = Policy.getPolicy();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines