[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    [OpenJDK 2D-Dev] Fwd: Re:  Small patch for multi-catch :)
From:       Ulf.Zibis () gmx ! de (Ulf Zibis)
Date:       2011-10-08 12:24:42
Message-ID: 4E904102.6090109 () gmx ! de
[Download RAW message or body]

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 

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic