Detecting redundant throws clauses in public methods
I was wondering if now in Maia, now that IntelliJ can detect when a method is never called, can it also detect when it's never extended and so can detect when a throws clause is redundant in a method, e.g.
public void doNothing throws SQLException {
//do nothing
}
I've tested this out and IntelliJ doesn't complain about the SQLException unless I make the method static, private or final or the class final. I think it would be a good improvement to have.
请先登录再写评论。
Hello Adam,
There is only a global inspection for this now.
Thank you
-
Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"