@pguardiola It has nothing to do with raw types, its just a mismatch of the Generics. Imagine the follow:
public class Function<I, O> {
public O getPropertyValue() { }
}
public static <T> PropertyValue<Function<T, String>> lineColor(Function<T, String> function) {
return new PaintPropertyValue<>("line-color", function);
}
private fun foo(bar: Function<Any, Any>) {
lineColor(bar)
}
foo(Function<String, Int>())
The
lineColor
-Method expects your Function<> to return a String on
getPropertyValue
, but our
bar
returns an Int.
Passing
Function<String, Int>
into
foo()
is perfectly fine, but passing it into
lineColor
doesn't work because of the different types of
O