void (String[] args) { Optional<String> value = Optional.of("value"); <error descr="Incompatible types. Found: 'foo.Boo.MyGenericClass<capture<?>>', required: 'foo.Boo.MyGenericClass<java.lang.Integer>'">MyGenericClass<Integer> myClassValue = value.map(MyGenericClass::<Integer>create).orElse(null);</error> }