@Override
    public boolean matches(final Service service, final Service serviceToMatch) {
        try {
            if (service != null && serviceToMatch != null) {
                return compareServices(service, serviceToMatch);
            }
        } catch (final Exception e) {
            LoggingUtils.error(LOGGER, e);
        }
        return false;
    }
This is {@link DefaultServiceMatchingStrategy}.

@author Misagh Moayyed
@since 6.1.0
core/cas-server-core-services-authentication/src/main/java/org/apereo/cas/authentication/principal/DefaultServiceMatchingStrategy.java