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 200707 - multicatch hint should not be proposed when it involves subclasses
Summary: multicatch hint should not be proposed when it involves subclasses
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Hints & Annotations (show other bugs)
Version: 7.0
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-05 16:11 UTC by lhochet
Modified: 2011-08-24 09:20 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lhochet 2011-08-05 16:11:18 UTC
The multicatch hint should not be proposed when it involves subclasses.

eg:
try
{
...
}
catch (UnknownHostException ex)
{
  System.err.println("test");
}
catch (IOException ex)
{
  System.err.println("test");
}


This is with:
Product Version: NetBeans IDE Dev (Build 201108030600)
Java: 1.7.0; Java HotSpot(TM) Client VM 21.0-b17
System: Windows 7 version 6.1 running on x86; Cp1252; fr_FR (nb)
Comment 1 Quality Engineering 2011-08-10 21:33:12 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/cbe54cf6288b
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #200707: prevent generating multicatch for exception classes that have subtype-supertype relation.
Comment 2 Jan Lahoda 2011-08-10 21:40:22 UTC
Fixed by the above commit. Thanks for the report.
Comment 3 Jiri Prox 2011-08-12 11:31:45 UTC
verified


Product Version: NetBeans IDE Dev (Build 201108111304)
Java: 1.7.0; Java HotSpot(TM) Client VM 21.0-b17
System: Windows 7 version 6.1 running on x86; Cp1252; en_US (nb)
User directory: C:\Users\jprox\.netbeans\dev
Cache directory: C:\Users\jprox\.netbeans\dev\var\cache
Comment 4 Jan Lahoda 2011-08-19 10:18:57 UTC
http://hg.netbeans.org/releases/rev/cb84f9858e65
Comment 5 Jiri Prox 2011-08-24 09:20:49 UTC
verified in 7.0.1-patch1