Re: RFR: 8342903: Deprecate for removal java.awt.Window.getWarningString() [v2]

2024-11-20 Thread Phil Race
On Tue, 19 Nov 2024 19:29:28 GMT, Phil Race  wrote:

>> This fix deprecates for removal java.awt.Window.getWarningString() and also 
>> javax.swing.JInternalFrame.getWarningString()
>> l java.awt.Window.getWarningString() is only relevant with a SecurityManager 
>> and javax.swing.JInternalFrame.getWarningString() is just there for symmetry.
>> 
>> A few other spec changes ensue - the serial form variable warningString is 
>> removed is the main one.
>> The AWTPermission showWindowWithoutWarningBanner is obsolete
>> Reference to the system property  "awt.appletWarning" was actually already 
>> removed by JEP 486
>> 
>> There is a CSR for the spec. changes, which will need a reviewer : 
>> https://bugs.openjdk.org/browse/JDK-8344451
>> 
>> But the vast majority of the changes here are all the downstream obsoleted 
>> implementation
>> The warning string and warning icon, and warning windows are all obsoleted.
>> I think I tracked down all of it, but it is hard to be sure.
>> Automated tests are passing, and I've manually tested SwingSet2 on all 3 
>> platforms.
>
> Phil Race has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   8344451

Updated per Alexander's comments

-

PR Comment: https://git.openjdk.org/jdk/pull/1#issuecomment-2489758929


Re: RFR: 8342903: Deprecate for removal java.awt.Window.getWarningString() [v2]

2024-11-20 Thread Phil Race
On Tue, 19 Nov 2024 19:29:28 GMT, Phil Race  wrote:

>> This fix deprecates for removal java.awt.Window.getWarningString() and also 
>> javax.swing.JInternalFrame.getWarningString()
>> l java.awt.Window.getWarningString() is only relevant with a SecurityManager 
>> and javax.swing.JInternalFrame.getWarningString() is just there for symmetry.
>> 
>> A few other spec changes ensue - the serial form variable warningString is 
>> removed is the main one.
>> The AWTPermission showWindowWithoutWarningBanner is obsolete
>> Reference to the system property  "awt.appletWarning" was actually already 
>> removed by JEP 486
>> 
>> There is a CSR for the spec. changes, which will need a reviewer : 
>> https://bugs.openjdk.org/browse/JDK-8344451
>> 
>> But the vast majority of the changes here are all the downstream obsoleted 
>> implementation
>> The warning string and warning icon, and warning windows are all obsoleted.
>> I think I tracked down all of it, but it is hard to be sure.
>> Automated tests are passing, and I've manually tested SwingSet2 on all 3 
>> platforms.
>
> Phil Race has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   8344451

> I'll still be looking further, but it seems that there are few places that 
> need more attention:
> 
> ```shell
> # grep for securitywarning
> ./open/src/jdk.compiler/share/data/symbols/java.desktop-8.sym.txt:7709:method 
> name repositionSecurityWarning descriptor ()V flags 401
> ./src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java:206:static 
> boolean securityWarningEnabled;
> ./src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java:218:
> initSecurityWarning();
> ./src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java:247:static void 
> initSecurityWarning() {
> ./src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java:252:
> securityWarningEnabled = (runtime != null && runtime.contains("internal"));
> ./src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java:255:static 
> boolean isSecurityWarningEnabled() {
> ./src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java:256:return 
> securityWarningEnabled;
> ./src/java.desktop/unix/classes/sun/awt/X11/XBaseWindow.java:947:if 
> (XToolkit.isSecurityWarningEnabled() && XToolkit.isToolkitThread()) {
> ./src/java.desktop/windows/native/libawt/windows/awt.rc:32:// 
> securityWarningIconCounter constant in awt_Toolkit.cpp.
> ```
> 
> `XToolkit` can also be cleaned up, and all usages of 
> `XBaseWindow#checkSecurity()` can also be removed.
> 
> The `awt.rc` file looks like another candidate for removal, along with an 
> update of `AwtLibraries.gmk`.



> I'll still be looking further, but it seems that there are few places that 
> need more attention:
> 
> ```shell
> # grep for securitywarning
> ./open/src/jdk.compiler/share/data/symbols/java.desktop-8.sym.txt:7709:method 
> name repositionSecurityWarning descriptor ()V flags 401
> ./src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java:206:static 
> boolean securityWarningEnabled;
> ./src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java:218:
> initSecurityWarning();
> ./src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java:247:static void 
> initSecurityWarning() {
> ./src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java:252:
> securityWarningEnabled = (runtime != null && runtime.contains("internal"));
> ./src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java:255:static 
> boolean isSecurityWarningEnabled() {
> ./src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java:256:return 
> securityWarningEnabled;
> ./src/java.desktop/unix/classes/sun/awt/X11/XBaseWindow.java:947:if 
> (XToolkit.isSecurityWarningEnabled() && XToolkit.isToolkitThread()) {

I thought I'd got those (!) Must have not got back to them. So many trails to 
follow.
Fixing it just now I realise this is going to conflict with Harshita's PR : 
https://github.com/openjdk/jdk/pull/22218 - oh well .. I'll resolve that when I 
have to.

> ./src/java.desktop/windows/native/libawt/windows/awt.rc:32:// 
> securityWarningIconCounter constant in awt_Toolkit.cpp.
> ```
> 
> `XToolkit` can also be cleaned up, and all usages of 
> `XBaseWindow#checkSecurity()` can also be removed.

yes. checkSecurity can go.

> 
> The `awt.rc` file looks like another candidate for removal, along with an 
> update of `AwtLibraries.gmk`.

It seems like it is just the refs to the SECURITY_WARNING icons (and the icon 
files themselves) that should be removed, so the file is edited but not removed 
and no change to the make file.

-

PR Comment: https://git.openjdk.org/jdk/pull/1#issuecomment-2489413787


Re: RFR: 8342903: Deprecate for removal java.awt.Window.getWarningString() [v2]

2024-11-19 Thread Alexander Zvegintsev
On Tue, 19 Nov 2024 19:29:28 GMT, Phil Race  wrote:

>> This fix deprecates for removal java.awt.Window.getWarningString() and also 
>> javax.swing.JInternalFrame.getWarningString()
>> l java.awt.Window.getWarningString() is only relevant with a SecurityManager 
>> and javax.swing.JInternalFrame.getWarningString() is just there for symmetry.
>> 
>> A few other spec changes ensue - the serial form variable warningString is 
>> removed is the main one.
>> The AWTPermission showWindowWithoutWarningBanner is obsolete
>> Reference to the system property  "awt.appletWarning" was actually already 
>> removed by JEP 486
>> 
>> There is a CSR for the spec. changes, which will need a reviewer : 
>> https://bugs.openjdk.org/browse/JDK-8344451
>> 
>> But the vast majority of the changes here are all the downstream obsoleted 
>> implementation
>> The warning string and warning icon, and warning windows are all obsoleted.
>> I think I tracked down all of it, but it is hard to be sure.
>> Automated tests are passing, and I've manually tested SwingSet2 on all 3 
>> platforms.
>
> Phil Race has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   8344451

I'll still be looking further, but it seems that there are few places that need 
more attention:


# grep for securitywarning
./open/src/jdk.compiler/share/data/symbols/java.desktop-8.sym.txt:7709:method 
name repositionSecurityWarning descriptor ()V flags 401
./src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java:206:static 
boolean securityWarningEnabled;
./src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java:218:
initSecurityWarning();
./src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java:247:static void 
initSecurityWarning() {
./src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java:252:
securityWarningEnabled = (runtime != null && runtime.contains("internal"));
./src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java:255:static 
boolean isSecurityWarningEnabled() {
./src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java:256:return 
securityWarningEnabled;
./src/java.desktop/unix/classes/sun/awt/X11/XBaseWindow.java:947:if 
(XToolkit.isSecurityWarningEnabled() && XToolkit.isToolkitThread()) {
./src/java.desktop/windows/native/libawt/windows/awt.rc:32:// 
securityWarningIconCounter constant in awt_Toolkit.cpp.


`XToolkit` can also be cleaned up, and all usages of 
`XBaseWindow#checkSecurity()` can also be removed.

The `awt.rc` file looks like another candidate for removal, along with an 
update of `AwtLibraries.gmk`.

-

PR Comment: https://git.openjdk.org/jdk/pull/1#issuecomment-2487363775


Re: RFR: 8342903: Deprecate for removal java.awt.Window.getWarningString() [v2]

2024-11-19 Thread Erik Joelsson
On Tue, 19 Nov 2024 19:29:28 GMT, Phil Race  wrote:

>> This fix deprecates for removal java.awt.Window.getWarningString() and also 
>> javax.swing.JInternalFrame.getWarningString()
>> l java.awt.Window.getWarningString() is only relevant with a SecurityManager 
>> and javax.swing.JInternalFrame.getWarningString() is just there for symmetry.
>> 
>> A few other spec changes ensue - the serial form variable warningString is 
>> removed is the main one.
>> The AWTPermission showWindowWithoutWarningBanner is obsolete
>> Reference to the system property  "awt.appletWarning" was actually already 
>> removed by JEP 486
>> 
>> There is a CSR for the spec. changes, which will need a reviewer : 
>> https://bugs.openjdk.org/browse/JDK-8344451
>> 
>> But the vast majority of the changes here are all the downstream obsoleted 
>> implementation
>> The warning string and warning icon, and warning windows are all obsoleted.
>> I think I tracked down all of it, but it is hard to be sure.
>> Automated tests are passing, and I've manually tested SwingSet2 on all 3 
>> platforms.
>
> Phil Race has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   8344451

Build change looks ok.

-

Marked as reviewed by erikj (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/1#pullrequestreview-2446618248