[OpenJDK 2D-Dev] Fwd: Re: Small patch for multi-catch :)

Ulf Zibis Ulf.Zibis at gmx.de
Sat Oct 8 12:24:42 UTC 2011


See: Bug 7092231 <http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7092231> - Remove incomplete 
package sun.dc from OpenJDK sources
See: Bug 7092246 <http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7092246> - Simplify 
sun.awt.geom.PathConsumer2D.RenderingEngine.getInstance()

-Ulf


Am 23.07.2011 22:35, schrieb Mario Torre:
> 2011/7/23 Ulf Zibis<Ulf.Zibis at gmx.de>:
>> Hi,
>>
>> couldn't you use ReflectiveOperationException instead?
> That's a good point, right.
>
>> Additionally you could better profit from generics:
> Yeah, but I don't want to change more than needed.
>
>> And again more simple just use (no need for try...catch):
>>
>>                 public RenderingEngine run() {
>>                     String reClass =
>> System.getProperty("sun.java2d.renderer");
>>                     if ("sun.dc.DuctusRenderingEngine".equals(reClass)) {
>>                         return new sun.dc.DuctusRenderingEngine();
>>                     }
>>                     for (RenderingEngine re : ServiceLoader.loadInstalled(
>>                             RenderingEngine.class)) {
>>                         if (re.getClass().getName().equals(reClass)) {
>>                             return re;
>>                         }
>>                     }
>>                     return null;
>>                 }
>>
>> -Ulf
> Again, I don't want to change more than needed. In this case, however,
> I miss your point; as far as I know sun.dc.DuctusRenderingEngine()
> cannot be instantiated, is not part of the OpenJDK distribution, so
> this would not work on OpenJDK.
>
> Cheers,
> Mario
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20111008/a1be14b8/attachment.html>


More information about the 2d-dev mailing list