This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 65804

Summary: Safely delete nontrivial class shows misleading warning
Product: editor Reporter: Petr Nejedly <pnejedly>
Component: RefactoringAssignee: Daniel Prusa <dprusa>
Status: VERIFIED FIXED    
Severity: blocker Keywords: USABILITY
Priority: P3    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Petr Nejedly 2005-10-04 08:40:09 UTC
If you have a class that references itself and try to safely delete it,
it shows you warning that there are references to the class, while find usages
reveals only self-references.
Pressing Next, Do refactoring correctly deletes the class, but the warning is very
misleading. I haven't even thought I could try pressing Next when I saw the
warning first.
Comment 1 Jan Becicka 2005-10-04 11:00:51 UTC
References to all elements from current selection should be ignored.
If you select method foo() and method bar() and invoke Safe Delete - no warning
should be shown in this case:

private void foo() {
  bar();
}
private void bar() {
}

Bharath, please take a look at it, thanks.

Comment 2 Daniel Prusa 2005-10-17 15:01:06 UTC
Fixed in trunk.

/cvs/refactoring/src/org/netbeans/modules/refactoring/plugins/SafeDeleteRefactoringPlugin.java

new revision: 1.15; previous revision: 1.14
Comment 3 Petr Nejedly 2005-10-18 13:43:14 UTC
Verified today.