By invoking ConcurrentHashMap#keySet(), the class file of SessionFactoryImpl contains a reference to the type KeySetView which only is available since Java 8.