Here's a visual of the problem:
As can be seen from the visual, the IDE is showing a compile-time error to which it does not allow the class
to be inserted into the Map.
Here's a simplified version:
@Override
public <T extends Comparable> void transactPersistentEntityStore(...) {
Map<Class<T>, ComparableBinding> propertyTypeMap = new HashMap<>();
propertyTypeMap.put(EmbeddedArrayIterable.class, EmbeddedEntityBinding.BINDING);
propertyTypeMap.put(EmbeddedEntityIterable.class, EmbeddedEntityBinding.BINDING);
// ...
}
Even if both EmbeddedArrayIterable
and EmbeddedEntityIterable
implements Comparable
Am I missing or misunderstanding something on generics?