How to prevent weakening TO a type?
已回答
The inspection "Type may be weakened" has a Stop Class section that works by not weakening FROM types in the list, but I've got a problem.
I have many classes with identical auto-generated code like this:
FormListener formListener = new FormListener();
private class FormListener implements ActionListener {...} // inner class
I can't configure the inspection to prevent weakening FROM a type because there's no FROM type here, it's an inner class. The only thing common to all these is the TO class, namely ActionListener, but if I add that to the intension's list noting happens.
How can I prevent these from appearing in the Inspection Results pane?
It would actually preferable to suppress ALL warnings inside auto-generated code blocks (which have clear markers), if possible at all.
请先登录再写评论。
Hello Mark,
Currenlty it's not possible.
Feel free to create feature request on YouTrack: http://youtrack.jetbrains.com/issues/IDEA.