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 174432 - "Use supertype where possible" does not handle "throws"
Summary: "Use supertype where possible" does not handle "throws"
Status: REOPENED
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jan Becicka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-13 11:20 UTC by Tim Lebedkov
Modified: 2010-09-23 08:48 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Project (11.04 KB, application/x-zip-compressed)
2009-12-16 03:11 UTC, Tim Lebedkov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Lebedkov 2009-10-13 11:20:22 UTC
I have the following definition in my project:

class FileSystemException extends IOException {...}

after applying "Use supertype where possible" to it the following code was not changed:

throws FileSystemException, IOException
Comment 1 Filip Zamboj 2009-10-19 13:05:34 UTC
what build are you using, please? 
Comment 2 Tim Lebedkov 2009-10-19 13:53:33 UTC
Product Version: NetBeans IDE 6.7 (Build 200906241340)
Java: 1.6.0_14; Java HotSpot(TM) Client VM 14.0-b16
System: Windows XP version 5.1 running on x86; Cp1252; de_DE (nb)
Userdir: C:\Dokumente und Einstellungen\Lebedkov\.netbeans\6.7
Comment 3 Michael Nazarov 2009-10-26 08:55:01 UTC
Would you please specify more details about project code and steps how to
reproduce. I'm unable to reproduce with simple code and just menu clicking.
Comment 4 Tim Lebedkov 2009-12-16 03:11:10 UTC
- open the attached project
- open Main.java
- select FileSystemException in private static void a() throws FileSystemException, IOException
- invoke "User Supertype where possible"
- choose java.io.Exception

=> the code
private static void a() throws FileSystemException, IOException

is not changed to

private static void a() throws IOException
Comment 5 Tim Lebedkov 2009-12-16 03:11:42 UTC
Created attachment 92656 [details]
Project
Comment 6 Vojtech Sigler 2009-12-21 05:19:23 UTC
Reassigning to java refactoring for evaluation.
Comment 7 Jan Jancura 2010-02-15 07:43:02 UTC
This type of refactoring does not change method signature. Its designed to be used in local statements only.
Comment 8 Tim Lebedkov 2010-05-06 21:48:00 UTC
I think it is at least a valid enhancement