-
Enhancement
-
Resolution: Unresolved
-
P4
-
24
-
Cause Known
Method.invoke and Constructor.newInstance wrap Error instances from the calls into InvocationTargetException instances. If the Error is OutOfMemoryError or StackOverflowError, attempts to wrap the ITE into other exceptions may fail with secondary Error, which will hide the original Error.
Changing the API to propagate any Error is out-of-spec, and is not considered.
We should add notes in these 2 methods about the potential risks of swallowing errors.
Changing the API to propagate any Error is out-of-spec, and is not considered.
We should add notes in these 2 methods about the potential risks of swallowing errors.
- csr for
-
JDK-8335482 Add notes for Error handling in Method.invoke and Constructor.newInstance
- Draft
- duplicates
-
JDK-6541507 (reflect spec) Method.invoke() @throws InvocationTargetException
- Closed
-
JDK-8335333 Jdk DynamicProxy throw java.lang.NoClassDefFoundError
- Closed
- links to
-
Review(master) openjdk/jdk/19980