public Query toQuery() {
        return Objects.requireNonNullElseGet(query, () -> QueryFactory.none(serviceClass));
    }
Return the real query.

@return the query
core/cas-server-core-services-registry/src/main/java/org/apereo/cas/services/query/RegisteredServiceQueryAttribute.java