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

Key: IDEADEV-22345
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Normal Normal
Assignee: Anna Kozlova
Reporter: Sascha Weinreuter
Votes: 0
Watchers: 0
Operations

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

Empty Method inspection: False positive for increased access level

Created: 08 Oct 07 01:49   Updated: 06 Dec 07 18:51
Component/s: Code Analysis. Inspection
Fix Version/s: Selena 7.0.2

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 7,330
Fixed in build: 7,509
Severity: Medium


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


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