History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEA-12220
Type: Bug Bug
Status: Open Open
Assignee: Alexey Kudravtsev
Reporter: Stephen Friedrich
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
IDEA: Feedback

"Unchecked Assignment": Stupid quickfix

Created: 03 Apr 07 19:45   Updated: 03 Apr 07 23:19
Component/s: Code Analysis. Inspection

Build: 6,791
Severity: Medium


 Description  « Hide
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();
    }
}


 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.