I have been meaning to complain about this for quite a long while, but never got around to do it. Nobody else did, either, so here it is finally:
In this example Idea proposes to generify "Foo", which makes no sense at all.
Instead it should propose to generify "EntityManager" - if that weren't a library class.
So in this case, there should be no quickfix at all:
import javax.persistence.EntityManager;
import java.util.List;
public class Foo {
private void foo(EntityManager em) {
List<String> names = em.createQuery("select u.name from user ud").getResultList();
}
}
Description
I have been meaning to complain about this for quite a long while, but never got around to do it. Nobody else did, either, so here it is finally:
In this example Idea proposes to generify "Foo", which makes no sense at all.
Instead it should propose to generify "EntityManager" - if that weren't a library class.
So in this case, there should be no quickfix at all:
import javax.persistence.EntityManager;
import java.util.List;
public class Foo {
private void foo(EntityManager em) {
List<String> names = em.createQuery("select u.name from user ud").getResultList();
}
}