Bug 67981 - Add Java Exception Breakpoint is broken
Summary: Add Java Exception Breakpoint is broken
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M2   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-21 06:51 EDT by Jörg von Frantzius CLA
Modified: 2004-09-23 10:28 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jörg von Frantzius CLA 2004-06-21 06:51:52 EDT
This is with 3.0 RC3

When I want to add a Java Exception Breakpoint for an Exception that in fact
*does* inherit from Exception, the dialog says "Selected type is not a subclass
of java.lang.Throwable". The Exception in question is org.xml.sax.SaxException
coming from xerces.jar (Xerces 1.4.4) within my project.
Comment 1 Darin Wright CLA 2004-06-21 09:34:47 EDT
I am unable to reproduce this in my workspace. In my workspace, the exception 
is coming from a jar in my JRE (a 1.4.2 JRE). Is the jar on one of your 
project's build paths?
Comment 2 Jörg von Frantzius CLA 2004-06-21 11:16:15 EDT
Yes, I have xerces.jar (version 1.4.4) in my buildpath (shows up in project's
properties buildpath). The project is a JDK 1.3.1_09 project, by the way, which
is why I have to use a separate xerces.jar in the first place.

If you want to reproduce, you might want to setup such a project and put
xerces.jar in the buildpath. You can find the .jar at
http://xml.apache.org/dist/xerces-j/Xerces-J-bin.1.4.4.zip
Comment 3 Darin Wright CLA 2004-06-21 11:37:15 EDT
I can reproduce the problem when the xerces jar is on the buildpath and a JRE 
with SaxException is also on buildpath. If I change to use a JRE that does not 
contain xerces/SaxException then I can add the breakpoint successfully. In the 
failure case, there is more than one SaxException on the buildpath, and adding 
the first works (from the JRE). Adding the second fails. Steppin thru the code 
it looks like the computed type hierarchy is showing "null" for the superclass 
of SaxException.

Steps:

* Create a new project, build with a 1.4.2 JRE (IBM or Sun)
* Add external xerces jar to the buildpath (version 1.4.4, as referenced above)
* Try to create an exception breakpoint for SaxException, from the 1.4.4 jar
-> claims that SaxException is not a subclass of throwable

Re-assigning to JCORE for investigation
Comment 4 Jerome Lanneluc CLA 2004-09-08 11:28:11 EDT
Changed HierarchyBuilder.lookupBinaryHandle(...) to return the focus handle 
instead of the visible one.

Added regression test TypeHierarchyTests.testBinaryTypeHiddenByOther
Comment 5 Frederic Fusier CLA 2004-09-23 10:28:19 EDT
Verified for 3.1 M2 with build I200409230010.