BZ #18: Doesn't raise expected exception during MethodInterceptor.invoke

Status fields:

creation_ts:2006-02-11 00:34
component:reflection
version:default branch
rep_platform:All
op_sys:Linux
bug_status:NEW
reporter:cacao@pcedev.com
If an exception is thrown during the invocation of MethodInterceptor.invoke
(which happens in calls on Proxy), the exact exception should be raised instead
of a generic UndeclaredThrowableException.
This problems can be seen in spring junit tests and is not reproduced with jamvm
nor Sun jdk.

junit.framework.AssertionFailedError: exception matches
expected:<java.lang.Exception> but
was:<java.lang.reflect.UndeclaredThrowableException>
   at junit.framework.Assert.fail (Assert.java:47)
   at junit.framework.Assert.failNotEquals (Assert.java:282)
   at junit.framework.Assert.assertEquals (Assert.java:64)
   at
org.springframework.aop.framework.AbstractAopProxyTests.testUndeclaredCheckedException
(AbstractAopProxyTests.java:505)
   at java.lang.reflect.Method.invokeNative (Native Method)
   at java.lang.reflect.Method.invoke (Method.java:329)
   at junit.framework.TestCase.runTest (TestCase.java:154)
   at junit.framework.TestCase.runBare (TestCase.java:127)
   at junit.framework.TestResult$1.protect (TestResult.java:106)
   at junit.framework.TestResult.runProtected (TestResult.java:124)
   at junit.framework.TestResult.run (TestResult.java:109)
   at junit.framework.TestCase.run (TestCase.java:118)
   at junit.framework.TestSuite.runTest (TestSuite.java:208)
   at junit.framework.TestSuite.run (TestSuite.java:203)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests
(RemoteTestRunner.java:478)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run
(RemoteTestRunner.java:344)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main
(RemoteTestRunner.java:196)