Request for approval for CR 6961123 - setWMClass fails to null-terminate WM_CLASS string

Omair Majid omajid at redhat.com
Thu Feb 11 17:44:47 UTC 2016


Hi,

I ran into GNOME shell displaying what looked like a non-null-terminated
string as the name of the Java program. It turned out to be an old bug
with a one-liner fix.

Bug: https://bugs.openjdk.java.net/browse/JDK-6961123
Webrev: http://cr.openjdk.java.net/~omajid/webrevs/6961123-missing-null-wmclass-jdk8u/00/

The ICCCM [1] states:

    The WM_CLASS property (of type STRING without control characters)
    contains two consecutive null-terminated strings. 
    ...
    Note that WM_CLASS strings are null-terminated and, thus, differ
    from the general conventions that STRING properties are
    null-separated. 

But AWT doesn't do that. It uses two null-separated strings for
WM_CLASS. The webrev fixes that.

The fix is identical to that in jdk9 (except for paths) and jdk8. The
jdk9 patch review thread:
http://mail.openjdk.java.net/pipermail/awt-dev/2015-December/010496.html

Thanks,
Omair

[1] https://tronche.com/gui/x/icccm/sec-4.html

-- 
PGP Key: 66484681 (http://pgp.mit.edu/)
Fingerprint = F072 555B 0A17 3957 4E95  0056 F286 F14F 6648 4681


More information about the jdk7u-dev mailing list