Issue Details (XML | Word | Printable)

Key: DERBY-4010
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Trivial Trivial
Assignee: Knut Anders Hatlen
Reporter: Knut Anders Hatlen
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Derby

PassThroughException should not reimplement initCause()/getCause()

Created: 08/Jan/09 08:24 PM   Updated: 04/May/09 06:21 PM
Component/s: None
Affects Version/s: 10.5.1.1
Fix Version/s: 10.5.1.1

Time Tracking:
Not Specified

File Attachments:
  Size
File Licensed for inclusion in ASF works derby-4010.diff 2009-01-08 08:50 PM Knut Anders Hatlen 2 kB

Resolution Date: 20/Jan/09 01:27 PM


 Description  « Hide
org.apache.derby.iapi.error.PassThroughException has its own mechanism to achieve the same functionality as one gets from the initCause() and getCause() methods in java.lang.Throwable. This was needed when Derby supported Java 1.3, which didn't have initCause()/getCause(), but now that we don't support Java 1.3 we could simplify the class.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Knut Anders Hatlen added a comment - 08/Jan/09 08:50 PM
The attached patch simplifies PassThroughException so that it just contains a constructor that passes the wrapped exception to the super constructor. Also added javadoc comments.

I haven't run any tests yet. (According to the test coverage reports, this code isn't actually exercised by any of our tests, so I don't expect that they will fail. I don't know any simple way to get it tested either.)

Knut Anders Hatlen made changes - 08/Jan/09 08:50 PM
Field Original Value New Value
Attachment derby-4010.diff [ 12397444 ]
Knut Anders Hatlen made changes - 08/Jan/09 08:50 PM
Assignee Knut Anders Hatlen [ knutanders ]
Knut Anders Hatlen made changes - 08/Jan/09 08:50 PM
Status Open [ 1 ] In Progress [ 3 ]
Repository Revision Date User Message
ASF #736017 Tue Jan 20 13:26:31 UTC 2009 kahatlen DERBY-4010: PassThroughException should not reimplement initCause()/getCause()

Removed getException() method in PassThroughException and let the
callers use getCause() instead.
Files Changed
MODIFY /db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/context/ContextManager.java
MODIFY /db/derby/code/trunk/java/engine/org/apache/derby/iapi/error/PassThroughException.java

Knut Anders Hatlen added a comment - 20/Jan/09 01:27 PM
All the tests ran cleanly.
Committed revision 736017.

Knut Anders Hatlen made changes - 20/Jan/09 01:27 PM
Status In Progress [ 3 ] Closed [ 6 ]
Resolution Fixed [ 1 ]
Fix Version/s 10.5.0.0 [ 12313010 ]
Myrna van Lunteren made changes - 04/May/09 06:21 PM
Fix Version/s 10.5.0.0 [ 12313010 ]
Fix Version/s 10.5.1.1 [ 12313771 ]
Affects Version/s 10.5.0.0 [ 12313010 ]
Affects Version/s 10.5.1.1 [ 12313771 ]