Buggy code:
public class MapKVSSubscription < K , V > implements ObjectSubscription < K , V > , RawKVSSubscription < K , V > { private static final Logger LOG = LoggerFactory . getLogger ( MapKVSSubscription . class ) ; private final Set < TopicSubscriber < K , V > > topicSubscribers = new CopyOnWriteArraySet < > ( ) ; private final Set < Subscriber < MapEvent < K , V > > > subscribers = new CopyOnWriteArraySet < > ( ) ; private final Set < Subscriber < K > > keySubscribers = new CopyOnWriteArraySet < > ( ) ; private final Set < EventConsumer < K , V > > downstream = new CopyOnWriteArraySet < > ( ) ; private final SessionProvider sessionProvider ; @ Nullable private final Asset asset ; private final Map < Subscriber , Subscriber > subscriptionDelegate = new IdentityHashMap < > ( ) ; private KeyValueStore < K , V > kvStore ; private Map < String , SubscriptionStat > subscriptionMonitoringMap = null ; public MapKVSSubscription ( @ NotNull RequestContext requestContext , @ NotNull Asset asset ) { } public MapKVSSubscription ( @ Nullable Class viewType , @ Nullable Asset asset ) { } @ Override public void close ( ) { } @ Override public void onEndOfSubscription ( ) { } private void notifyEndOfSubscription ( @ NotNull Set < ? extends ISubscriber > subscribers ) { } private void notifyEndOfSubscription ( @ NotNull ISubscriber subscriber ) { } @ Override public boolean keyedView ( ) { } @ Override public void setKvStore ( KeyValueStore < K , V > kvStore ) { } @ Override public void notifyEvent ( @ NotNull MapEvent < K , V > changeEvent ) { } @ Override public int keySubscriberCount ( ) { } @ Override public int entrySubscriberCount ( ) { } @ Override public int topicSubscriberCount ( ) { } @ Override public boolean hasSubscribers ( ) { } @ Override public boolean hasValueSubscribers ( ) { } private void notifyEvent0 ( @ NotNull MapEvent < K , V > changeEvent ) { } private void notifyEvent1 ( @ NotNull MapEvent < K , V > changeEvent ) { } private void notifyEventToChild ( @ NotNull MapEvent < K , V > changeEvent ) { } @ Override public boolean needsPrevious ( ) { } @ Override public void registerSubscriber ( @ NotNull RequestContext rc , @ NotNull Subscriber subscriber , @ NotNull Filter filter ) { <START_BUG> Class eClass = rc . type ( ) ; <END_BUG> if ( ( eClass == ( Entry . class ) ) || ( eClass == ( MapEvent . class ) ) ) registerSubscriber0 ( rc , subscriber , filter ) ; else registerKeySubscriber ( rc , subscriber , filter ) ; } @ NotNull private < T > Subscriber < T > subscriber ( @ NotNull Subscriber < T > subscriber , @ NotNull Filter < T > filter ) { } private void registerSubscriber0 ( @ NotNull RequestContext rc , @ NotNull Subscriber < MapEvent < K , V > > subscriber , @ NotNull Filter < MapEvent < K , V > > filter ) { } @ Override public void registerKeySubscriber ( @ NotNull RequestContext rc , @ NotNull Subscriber < K > subscriber , @ NotNull Filter < K > filter ) { } @ Override public void registerTopicSubscriber ( @ NotNull RequestContext rc , @ NotNull TopicSubscriber subscriber ) { } @ Override public void registerDownstream ( @ NotNull EventConsumer < K , V > subscription ) { } public void unregisterDownstream ( EventConsumer < K , V > subscription ) { } @ Override public void unregisterSubscriber ( @ NotNull Subscriber subscriber ) { } @ Override public void unregisterTopicSubscriber ( @ NotNull TopicSubscriber subscriber ) { } private Map getSubscriptionMap ( ) { } private void addToStats ( String subType ) { } private void removeFromStats ( String subType ) { } }

Fix:
Class eClass = rc . elementType ( ) ;