On Thu, 13 May 2021 20:43:01 GMT, Phil Race <p...@openjdk.org> wrote:
>> Tejpal Rebari has updated the pull request incrementally with one additional >> commit since the last revision: >> >> code cleanup > > src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java line > 325: > >> 323: responder = createPlatformResponder(); >> 324: contentView.initialize(peer, responder); >> 325: setAllowAutomaticWindowTabbing(); > > This is in the initialize() method that is being called for every window. > That means the value could be changed by the app (back and forth!) during the > execution of the program. > We don't want that. So add it in a static initializer block for the class, so > it is only ever read ONCE and guaranteed to be read before the first window > is created. This then means the Java method isn't needed and the native > method will be static. Yeah, i have changed the method call to the native method in a static block and added the doPrivileged around getProperty. > src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java line > 607: > >> 605: >> nativeSetAllowAutomaticTabbingProperty(allowAutomaticWindowTabbing); >> 606: } >> 607: > > So we need a doPrivilged around the call to getProperty - in the new location > of the static block Done ------------- PR: https://git.openjdk.java.net/jdk/pull/3407