JDK-8205595 : Deprecate for removal com.sun.awt.SecurityWarning
  • Type: CSR
  • Component: client-libs
  • Sub-Component: java.awt
  • Priority: P3
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 11
  • Submitted: 2018-06-25
  • Updated: 2018-09-13
  • Resolved: 2018-07-05
Related Reports
CSR :  
Relates :  
Relates :  
Description
Summary
-------

Deprecate for removal com.sun.awt.SecurityWarning.

Problem
-------

The client code has an internal "com.sun.awt.SecurityWarning" class which at some point in the past, JDK 6u10, was used as a kind of "public" API. 
Starting jdk9 this class is accessible at runtime, but is NOT accessible at compile time or when the option "--illegal-access=deny" is specified.

Solution
--------

The solutions is to deprecate this APi in jdk10 and remove later.

Specification
-------------
    src/java.desktop/share/classes/com/sun/awt/SecurityWarning.java

      * <b>WARNING</b>: This class is an implementation detail and only meant
      * for limited use outside of the core platform. This API may change
      * drastically between update release, and it may even be
      * removed or be moved to some other packages or classes.
    + *
    + * @deprecated This class is deprecated, no replacement.
      */
    +@Deprecated(since = "11", forRemoval = true)
     public final class SecurityWarning {

http://cr.openjdk.java.net/~serb/8205588/webrev.00/src/java.desktop/share/classes/com/sun/awt/SecurityWarning.java.udiff.html
Comments
Moving to Approved.
05-07-2018

This CSR was created because this file was added via CCC: https://bugs.openjdk.java.net/browse/CCC-6749517 During development of jdk9 it was considered that this API is not supported and may be removed in the future: https://bugs.openjdk.java.net/browse/JDK-8051640. I would like to deprecate this class "for-removal" before drop it, this is the similar step which was done for the "com.sun.awt.AWTUtilities" https://bugs.openjdk.java.net/browse/JDK-8187253
25-06-2018