<Beans Dev> [9] Review Request: 8131926 java/beans/SimpleBeanInfo/LoadingStandardIcons/LoadingStandardIcons.java failure with modular JDK

Alexander Zvegintsev alexander.zvegintsev at oracle.com
Tue Aug 11 15:14:27 UTC 2015


+1

Thanks,

Alexander.

On 08/11/2015 05:38 PM, Alexander Scherbatiy wrote:
>
>   The fix looks good to me.
>
>   Thanks,
>   Alexandr.
>
> On 8/11/2015 5:27 PM, Sergey Bylokhov wrote:
>> You are right! Thanks.
>> An updated version:
>> http://cr.openjdk.java.net/~serb/8131926/webrev.02
>>
>> On 11.08.15 17:05, Alexander Scherbatiy wrote:
>>>
>>>  Is it possible to put the InputStream definition into the first try 
>>> block?
>>>  Something like:
>>>
>>>     public Image loadImage(final String resourceName) {
>>>         final Toolkit toolkit = Toolkit.getDefaultToolkit();
>>>         try (InputStream in = 
>>> getClass().getResourceAsStream(resourceName)) {
>>>             return toolkit.createImage(in.readAllBytes());
>>>         } catch (final Exception ignored) {
>>>         }
>>>         return null;
>>>     }
>>>
>>> Thanks,
>>> Alexandr.
>>>
>>> On 8/11/2015 4:51 PM, Sergey Bylokhov wrote:
>>>> Hello.
>>>> Please review the fix for jdk9.
>>>> This is the same bug as was described in [1] and [2] but this time 
>>>> in beans area.
>>>> So in the fix the usage of getResource was changed to 
>>>> getResourceAsStream.
>>>>
>>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8131926
>>>> Webrev can be found at: 
>>>> http://cr.openjdk.java.net/~serb/8131926/webrev.00
>>>>
>>>> [1] https://bugs.openjdk.java.net/browse/JDK-8078658
>>>> [2] 
>>>> http://mail.openjdk.java.net/pipermail/awt-dev/2015-May/009431.html
>>>>
>>>
>>
>>
>



More information about the beans-dev mailing list