util-jerseycompat/src/main/java/com/hpe/caf/util/jerseycompat/Jersey2ServiceIteratorProvider.java
@Override
    public <T> Iterator<Class<T>> createClassIterator(
        final Class<T> service,
        final String serviceName,
        final ClassLoader loader,
        final boolean ignoreOnClassNotFound
    )
    {
        final Iterator<Class<T>> delegateClassIterator = delegate.createClassIterator(
            service, serviceName, loader, ignoreOnClassNotFound);

        Stream<Class<T>> stream = StreamSupport.stream(
            Spliterators.spliteratorUnknownSize(delegateClassIterator, Spliterator.ORDERED), false);

        return stream.filter(t -> !t.getPackage().getName().startsWith("com.sun.jersey")).collect(Collectors.toList()).iterator();
    }
@Override
    public <T> Iterator<Class<T>> createClassIterator(
        final Class<T> service,
        final String serviceName,
        final ClassLoader loader,
        final boolean ignoreOnClassNotFound
    )
    {
        final Iterator<Class<T>> delegateClassIterator = delegate.createClassIterator(
            service, serviceName, loader, ignoreOnClassNotFound);

        Stream<Class<T>> stream = StreamSupport.stream(
            Spliterators.spliteratorUnknownSize(delegateClassIterator, Spliterator.ORDERED), false);

        return stream.filter(t -> !t.getPackage().getName().startsWith("com.sun.jersey")).collect(Collectors.toList()).iterator();
    }
Excludes all "com.sun.jersey" classes.