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.
NB 4.2 (200507272036) JDK 1.5.0_04 Experimental refactoring 0.20.0.2.3 DebugException is thrown when safe deleting generic type from method parameters. Steps to reproduce: 1) create new class: public interface Basic<T> { void methodA(int x, int... y); void methodB(T a, T b); } 2) select type T from the methodB (don't matter if first one or second one) 3) call Refactoring | Safe delete 4) confirm dialog ->org.netbeans.mdr.util.DebugException: Invalid key at org.netbeans.mdr.storagemodel.MdrStorage.getObjectsFromIndex(MdrStorage.java:725) at org.netbeans.mdr.storagemodel.IndexImmutSet.getObjects(IndexImmutSet.java:66)
Created attachment 23384 [details] exception
It is reproducible with all data types, not only in methods headers. This exception is even thrown when deleting class field whose type is another class. (IMHO in this case the usage of the proper class should be checked and if no one found the class can be deleted)
Bharath, please take a look at it. Thanks.
SafeDelete now handles generic types and also prevents invocation on a method/constructor parameter. Files modified:SafeDeletePanel.java, SafeDeleteRefactoringPlugin.java
verified