I just cant understand this. I'm calling
AnnotationConfiguration annotationConfiguration = new AnnotationConfiguration();
SessionFactory sessionFactory = annotationConfiguration.configure().buildSessionFactory();
Map<?, ?> allClassMetadata = sessionFactory.getAllClassMetadata();
Well, the only way I don't have warning is if I'm using wildcard ?
But! if I look at definition of getAllClassMetadata() method in the SessionFactory
interface or any of it's implementation the returning type is Map<String,ClassMetadata>
. So, the problem is. When I write
Map<String,ClassMetadata> allClassMetadata = sessionFactory.getAllClassMetadata();
Eclipse tells me The expression of type Map 开发者_开发知识库needs unchecked conversion to conform to Map<String,ClassMetadata>
I just don't get this. It's dumb. Please help.
This javadoc link says getAllClassMetadata()
returns a Map
精彩评论