@Override
public AbstractBindingNormalizedNodeCache load(final CodecContext key) {
// FIXME: Use a switch expression once we have https://openjdk.org/jeps/441
- if (key instanceof DataContainerCodecContext<?, ?> dataContainer) {
+ if (key instanceof DataContainerCodecContext<?, ?, ?> dataContainer) {
return new DataObjectNormalizedNodeCache(AbstractBindingNormalizedNodeCacheHolder.this,
dataContainer);
}
}
});
- private final ImmutableSet<Class<? extends BindingObject>> cacheSpec;
+ private final ImmutableSet<Class<?>> cacheSpec;
- AbstractBindingNormalizedNodeCacheHolder(final ImmutableSet<Class<? extends BindingObject>> cacheSpec) {
+ AbstractBindingNormalizedNodeCacheHolder(final ImmutableSet<Class<?>> cacheSpec) {
this.cacheSpec = requireNonNull(cacheSpec);
}
@SuppressWarnings("unchecked")
- <T extends BindingObject, C extends CodecContext & BindingObjectCodecTreeNode<?>>
+ <T extends BindingObject, C extends CodecContext & BindingObjectCodecTreeNode>
AbstractBindingNormalizedNodeCache<T, C> getCachingSerializer(final C childCtx) {
return isCached(childCtx.getBindingClass()) ? caches.getUnchecked(childCtx) : null;
}
- final boolean isCached(final Class<? extends BindingObject> type) {
+ final boolean isCached(final Class<?> type) {
return cacheSpec.contains(type);
}
}