[OpenJDK 2D-Dev] Request for review: 7084245: Update usages of InternalError to use exception chaining

Mario Torre neugens.limasoftware at gmail.com
Sun Aug 28 20:54:49 UTC 2011


Il giorno dom, 28/08/2011 alle 21.35 +0200, Sebastian Sickelmann ha
scritto:
> Hi, here is a webrev[1] for some cleanup that i want to integrated in 
> tl-repositories.

Hi,

The patch seems good for me (speaking in particular about the AWT/2D
part), and I don't think it will introduce any side effects.

Just a note:

src/share/classes/java/lang/invoke/CallSite.java:

         } catch (ReflectiveOperationException ignore) {
-            throw new InternalError();
+            throw new InternalError(ignore);
         }

Being a refactoring patch, I would not change the name from "ignore" to
the more classical "e", since we are not ignoring the exception anymore.

Also in src/share/classes/com/sun/servicetag/BrowserSupport.java, it
seems to me that you can also aggregate the InvocationTargetException in
the multi catch.

In fact, the block could be probably rewritten to take advantage of
ReflectiveOperationException.

Same for src/share/classes/sun/misc/Launcher.java,
src/share/classes/sun/security/util/SecurityConstants.java and
src/share/classes/sun/tracing/dtrace/DTraceProvider.java

Cheers,
Mario




More information about the security-dev mailing list