APISonar


org.eclipse.microprofile.concurrent.ThreadContext.SECURITY

> org > eclipse > microprofile > concurrent > ThreadContext > SECURITY
org APIs eclipse APIs microprofile APIs concurrent APIs ThreadContext APIs SECURITY APIs

Example 1
static void failOnUnknownContextTypes(HashSet<String> unknown, ArrayList<ThreadContextProvider> contextProviders) {
        Set<String> known = new HashSet<>();
        known.addAll(Arrays.asList(ThreadContext.ALL_REMAINING, ThreadContext.APPLICATION, ThreadContext.CDI, ThreadContext.SECURITY, ThreadContext.TRANSACTION));
        for (ThreadContextProvider provider : contextProviders) {
            String contextType = provider.getThreadContextType();
            known.add(contextType);
        }

        throw new IllegalStateException("Unknown thread contexts specified: " + unknown.toString() +
                                        ". Allowed thread contexts values are: " + known); // TODO NLS translated error message
    }