Project
IntelliJ IDEA
Priority
Normal
Type
Bug
Fix versions
No Fix versions
State
Fixed
Assignee
Anna Kozlova
Subsystem
Code Analysis. Inspection
Affected versions
No Affected versions
Fixed in build
108.65  
  • Created by   Sascha Weinreuter
    4 years ago (08 Oct 2007 02:49)
  • Updated by   root
    2 years ago (17 Jan 2010 20:54)
  • Jira: IDEADEV-22345
    (history, comments)
 
IDEA-41430 Empty Method inspection: False positive for increased access level
0
Issue is visible to: All Users
  The issue is visible to the selected user group only
The inspection says that findChildrenByClass only calls its super method. This is true, but it also enables package-level access to that method, which will fail when the method is removed (see Test2). This results in annoying errors when accepting the "Delete Unnecessary Method" fix...

class Test extends PsiElementBase {

  @Override
  @NotNull
  protected <T> T[] findChildrenByClass(Class<T> aClass) {
    return super.findChildrenByClass(aClass);
  }
}

class Test2 {
  void test(Test t) {
    final Object[] children = t.findChildrenByClass(PsiElement.class);
  }
}


Issue was resolved
Comments (0)
 
History
 
Linked Issues (?)
 
Issue has no comments