< prev index next >

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

Print this page
*** 64,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;
          });
--- 64,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 >