private static boolean match()

in geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/impl/ConfigProviderImpl.java [193:203]


    private static boolean match(ClientAuthContextType clientAuthContextType, String messageLayer, String appContext) {
        if (messageLayer == null) throw new NullPointerException("messageLayer");
        if (appContext == null) throw new NullPointerException("appContext");
        if (messageLayer.equals(clientAuthContextType.getMessageLayer())) {
            return appContext.equals(clientAuthContextType.getAppContext()) || clientAuthContextType.getAppContext() == null;
        }
        if (clientAuthContextType.getMessageLayer() == null) {
            return appContext.equals(clientAuthContextType.getAppContext()) || clientAuthContextType.getAppContext() == null;
        }
        return false;
    }