Skip to content

Commit

Permalink
Reflected comments
Browse files Browse the repository at this point in the history
Signed-off-by: jansupol <jan.supol@oracle.com>
  • Loading branch information
jansupol committed Apr 26, 2024
1 parent 6d1b86d commit e676dd2
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,12 @@ public void filter(ContainerRequestContext requestContext) throws IOException {
}
public static class InjectedFilterRegistrar implements DynamicFeature {
private final Class<?> filterToRegister;
private final AtomicInteger ai = new AtomicInteger(0);
public InjectedFilterRegistrar(Class<?> filterToRegister) {
this.filterToRegister = filterToRegister;
}
@Override
public void configure(ResourceInfo resourceInfo, FeatureContext context) {
if (ai.get() == 1) {
context.register(filterToRegister);
}
context.register(filterToRegister);
}
}
}

0 comments on commit e676dd2

Please sign in to comment.