< prev index next >

test/jdk/javax/security/auth/Subject/CallAsWithScopedValue.java

Print this page
*** 63,11 ***
              return null;
          });
  
          // Observable in structured concurrency in SV mode, but not in ACC mode
          Subject.callAs(subject, () -> {
!             try (var scope = new StructuredTaskScope<>()) {
                  scope.fork(() -> check(3, Subject.current(), usv ? "Duke" : null));
                  scope.join();
              }
              return null;
          });
--- 63,12 ---
              return null;
          });
  
          // Observable in structured concurrency in SV mode, but not in ACC mode
          Subject.callAs(subject, () -> {
!             var joiner = StructuredTaskScope.Joiner.awaitAll();
+             try (var scope = StructuredTaskScope.open(joiner)) {
                  scope.fork(() -> check(3, Subject.current(), usv ? "Duke" : null));
                  scope.join();
              }
              return null;
          });
< prev index next >