<AWT Dev> [9] Review request for 8132706 [macosx] Toolkit.getImage() throws NPE for null URL

prasanta sadhukhan prasanta.sadhukhan at oracle.com
Fri Apr 15 15:26:36 UTC 2016

Hi Alex,

Just one observation.
If url is null in  getImageFromHash() then wouldn't we be getting NPE 
from checkPermissions(url) as

it calls URLUtil.getConnectPermission(url); which calls  url.toString().toLowerCase()

so it will not come to your check , right?

String key = (url == null) ? null : url.toString();

On 4/15/2016 8:32 PM, Alexander Scherbatiy wrote:
> Hello,
> Could you review the fix:
>   bug: https://bugs.openjdk.java.net/browse/JDK-8132706
>   webrev: http://cr.openjdk.java.net/~alexsch/8132706/webrev.00
>   The fix makes the Toolkit.getDefaultToolkit().getImage(URL) return a 
> ToolkitImage based on URLImageSource with null url as it was before 
> the fix JDK-8011059.
>   Thanks,
>   Alexandr.

More information about the awt-dev mailing list