# HG changeset patch # User azvegint # Date 1394020047 -14400 # Node ID b2eb9ac5c635c439cdcebb709f9d17b95bd87834 # Parent 8405227c9f4ae892325446827f4a0fe73e08af3c 8035756: [parfait] JNI exception pending in windows/native/sun/java2d/windows/WindowsFlags.cpp Reviewed-by: serb, pchelko diff -r 8405227c9f4a -r b2eb9ac5c635 jdk/src/windows/native/sun/java2d/windows/WindowsFlags.cpp --- a/jdk/src/windows/native/sun/java2d/windows/WindowsFlags.cpp Tue Mar 04 18:59:35 2014 +0400 +++ b/jdk/src/windows/native/sun/java2d/windows/WindowsFlags.cpp Wed Mar 05 15:47:27 2014 +0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -47,12 +47,15 @@ { wFlagsClassID = (jclass)env->NewGlobalRef(wFlagsClass); d3dEnabledID = env->GetStaticFieldID(wFlagsClass, "d3dEnabled", "Z"); + CHECK_NULL(d3dEnabledID); d3dSetID = env->GetStaticFieldID(wFlagsClass, "d3dSet", "Z"); + CHECK_NULL(d3dSetID); } BOOL GetStaticBoolean(JNIEnv *env, jclass wfClass, const char *fieldName) { jfieldID fieldID = env->GetStaticFieldID(wfClass, fieldName, "Z"); + CHECK_NULL_RETURN(fieldID, FALSE); return env->GetStaticBooleanField(wfClass, fieldID); } @@ -60,6 +63,7 @@ const char *signature) { jfieldID fieldID = env->GetStaticFieldID(wfClass, fieldName, signature); + CHECK_NULL_RETURN(fieldID, NULL); return env->GetStaticObjectField(wfClass, fieldID); } @@ -90,15 +94,17 @@ forceD3DUsage = d3dSet; g_offscreenSharing = GetStaticBoolean(env, wFlagsClass, "offscreenSharingEnabled"); + JNU_CHECK_EXCEPTION(env); accelReset = GetStaticBoolean(env, wFlagsClass, "accelReset"); + JNU_CHECK_EXCEPTION(env); checkRegistry = GetStaticBoolean(env, wFlagsClass, "checkRegistry"); + JNU_CHECK_EXCEPTION(env); disableRegistry = GetStaticBoolean(env, wFlagsClass, "disableRegistry"); - jstring javaVersionString = (jstring)GetStaticObject(env, wFlagsClass, - "javaVersion", - "Ljava/lang/String;"); + JNU_CHECK_EXCEPTION(env); setHighDPIAware = (IS_WINVISTA && GetStaticBoolean(env, wFlagsClass, "setHighDPIAware")); + JNU_CHECK_EXCEPTION(env); J2dTraceLn(J2D_TRACE_INFO, "WindowsFlags (native):"); J2dTraceLn1(J2D_TRACE_INFO, " d3dEnabled = %s", @@ -166,6 +172,7 @@ jclass wFlagsClass) { SetIDs(env, wFlagsClass); + JNU_CHECK_EXCEPTION(env); GetFlagValues(env, wFlagsClass); }