Skip to content

Commit 7302fc4

Browse files
committed
fix(internal): Use deconstruction pattern for GroupOutcome.Allowed
1 parent 5ddd64f commit 7302fc4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/com/retailsvc/http/internal/SecurityFilter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ public void doFilter(HttpExchange exchange, Chain chain) throws IOException {
6666
List<GroupOutcome.Failed> failures = new ArrayList<>();
6767
for (SecurityRequirement group : effective) {
6868
GroupOutcome outcome = tryGroup(group, exchange, request);
69-
if (outcome instanceof GroupOutcome.Allowed allowed) {
69+
if (outcome instanceof GroupOutcome.Allowed(Map<String, Object> principals)) {
7070
try {
71-
ScopedValue.where(DispatchHandler.CURRENT, request.withPrincipals(allowed.principals()))
71+
ScopedValue.where(DispatchHandler.CURRENT, request.withPrincipals(principals))
7272
.call(
7373
() -> {
7474
chain.doFilter(exchange);

0 commit comments

Comments
 (0)