How can I extends a Java class that expects a Map<?, ?> in its constructor in Scala?
The Java class looks like
public class MyJavaClass {
private final Map<String, ?> originals;
public MyJavaClass(Map<?, ?> originals, Map<String, ?> configProviderProps, boolean doLog) { ... }
public MyJavaClass(Map<?, ?> originals) {
this(originals, Collections.emptyMap(), true);
}
}
In Scala I was trying to do something like below but my IDE tells my that it "cannot resolve overloaded Constructor":
class myScalaClass[K <: AnyRef, V <: AnyRef](origi: Map[K, V]) extends MyJavaClass(origi) { ... }
Also tried to replace AnyRef with java.lang.Object without success. I am using Java 8 and Scala 2.12.11.