ratatosk
ratatosk

Reputation: 393

Scala generics not correctly converted to Java in IntelliJ

I'm using IntelliJ IDEA 2016.1 with Java 1.8 and Scala 2.11.7

One scala class defines a method

def getLogger(c:Class[_]) =  org.slf4j.LoggerFactory.getLogger(c)

In the java class, I use this method via

getLogger(MyClass.class)

This has worked for a long time (and still works with colleges). Now IntelliJ claims, the getLogger method requires java.lang.Class<java.lang.Object> instead of the correct java.lang.Class<?>.

I can still run the code (directly in IntelliJ or via mvn) but the inspection still shows the error.

Which settings could I change to correct this?

Upvotes: 0

Views: 271

Answers (1)

niktrop
niktrop

Reputation: 576

It was a regression introduced in scala-plugin 3.0.3. Fix is available in 3.0.4.

Upvotes: 1

Related Questions