8323330: [BACKOUT] JDK-8276809: java/awt/font/JNICheck/FreeTypeScalerJNICheck.java shows JNI warning on Windows

Reviewed-by: prr, stuefe
This commit is contained in:
Matthias Baesken 2024-01-11 08:13:28 +00:00
parent 2b7fc0506a
commit cb1d25fcfa

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -126,15 +126,9 @@ BOOL DWMIsCompositionEnabled() {
dwmIsCompositionEnabled = bRes; dwmIsCompositionEnabled = bRes;
JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2); JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
jboolean hasException; JNU_CallStaticMethodByName(env, NULL,
JNU_CallStaticMethodByName(env, &hasException,
"sun/awt/Win32GraphicsEnvironment", "sun/awt/Win32GraphicsEnvironment",
"dwmCompositionChanged", "(Z)V", (jboolean)bRes); "dwmCompositionChanged", "(Z)V", (jboolean)bRes);
if (hasException) {
J2dTraceLn(J2D_TRACE_INFO, "Exception occurred in DWMIsCompositionEnabled");
env->ExceptionDescribe();
env->ExceptionClear();
}
return bRes; return bRes;
} }