JDK-8132706 : [macosx] Toolkit.getImage() throws NPE for null URL
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 9
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: os_x
  • Submitted: 2015-07-30
  • Updated: 2021-07-13
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Description
Run the following code:
------------------
import java.awt.Toolkit;
import java.net.URL;

public class ToolkitGetImageNullURLTest {

    public static void main(String[] args) {
        
        Toolkit.getDefaultToolkit().getImage((URL)null);
    }
}
------------------
Comments
I suggest to update the spec in jdk 10.
10-02-2017

Behavior of null is not specified in these methods, for some of getImage(XXX) methods we always throw an exception and for some of them we will throw an exception only when the security manager exist. This is not a regression in jdk 9 because it orks this way since 7u40/8u25.
10-02-2017

2/8/2017: Sergey, it's pending your evaluation
08-02-2017

2/6/2017: Pending evaluation
06-02-2017

moving back to Sergey
03-10-2016

See the discussion: http://mail.openjdk.java.net/pipermail/awt-dev/2016-April/011048.html
16-06-2016

This bug is "In Progress" status now, so re-targeting back to Fix Version 9. If you are not working on this bug fix anymore, please update the bug from "In Progress" to just "Open"
13-11-2015