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 61581 - DebugException when safe deleting data type
Summary: DebugException when safe deleting data type
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: _ bharathch
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-01 09:04 UTC by Jiri Prox
Modified: 2007-04-03 18:02 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
exception (1.31 KB, text/plain)
2005-08-01 09:04 UTC, Jiri Prox
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Prox 2005-08-01 09:04:09 UTC
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)
Comment 1 Jiri Prox 2005-08-01 09:04:28 UTC
Created attachment 23384 [details]
exception
Comment 2 Jiri Prox 2005-08-01 09:16:53 UTC
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)
Comment 3 Jan Becicka 2005-08-01 12:50:03 UTC
Bharath, please take a look at it. Thanks.
Comment 4 _ bharathch 2005-08-23 14:20:30 UTC
SafeDelete now handles generic types and also prevents invocation on a 
method/constructor parameter.
Files modified:SafeDeletePanel.java, SafeDeleteRefactoringPlugin.java
Comment 5 Jiri Prox 2005-08-30 10:29:56 UTC
verified