8035837: [parfait] JNI exception pending in jdk/src/windows/native/sun/windows/awt_KeyEvent.cpp
authorserb
Tue, 04 Mar 2014 18:59:35 +0400
changeset 23618 8405227c9f4a
parent 23617 1d73e27bd778
child 23619 b2eb9ac5c635
8035837: [parfait] JNI exception pending in jdk/src/windows/native/sun/windows/awt_KeyEvent.cpp Reviewed-by: pchelko, azvegint
jdk/src/windows/native/sun/windows/awt_KeyEvent.cpp
--- a/jdk/src/windows/native/sun/windows/awt_KeyEvent.cpp	Tue Mar 04 18:40:06 2014 +0400
+++ b/jdk/src/windows/native/sun/windows/awt_KeyEvent.cpp	Tue Mar 04 18:59:35 2014 +0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -48,19 +48,28 @@
     TRY;
 
     AwtKeyEvent::keyCodeID = env->GetFieldID(cls, "keyCode", "I");
+    DASSERT(AwtKeyEvent::keyCodeID != NULL);
+    CHECK_NULL(AwtKeyEvent::keyCodeID);
+
     AwtKeyEvent::keyCharID = env->GetFieldID(cls, "keyChar", "C");
+    DASSERT(AwtKeyEvent::keyCharID != NULL);
+    CHECK_NULL(AwtKeyEvent::keyCharID);
+
     AwtKeyEvent::rawCodeID = env->GetFieldID(cls, "rawCode", "J");
-    AwtKeyEvent::primaryLevelUnicodeID = env->GetFieldID(cls, "primaryLevelUnicode", "J");
-    AwtKeyEvent::scancodeID = env->GetFieldID(cls, "scancode", "J");
-    AwtKeyEvent::extendedKeyCodeID = env->GetFieldID(cls, "extendedKeyCode", "J");
-
+    DASSERT(AwtKeyEvent::rawCodeID != NULL);
+    CHECK_NULL(AwtKeyEvent::rawCodeID);
 
-    DASSERT(AwtKeyEvent::keyCodeID != NULL);
-    DASSERT(AwtKeyEvent::keyCharID != NULL);
-    DASSERT(AwtKeyEvent::rawCodeID != NULL);
+    AwtKeyEvent::primaryLevelUnicodeID = env->GetFieldID(cls, "primaryLevelUnicode", "J");
     DASSERT(AwtKeyEvent::primaryLevelUnicodeID != NULL);
+    CHECK_NULL(AwtKeyEvent::primaryLevelUnicodeID);
+
+    AwtKeyEvent::scancodeID = env->GetFieldID(cls, "scancode", "J");
     DASSERT(AwtKeyEvent::scancodeID != NULL);
+    CHECK_NULL(AwtKeyEvent::scancodeID);
+
+    AwtKeyEvent::extendedKeyCodeID = env->GetFieldID(cls, "extendedKeyCode", "J");
     DASSERT(AwtKeyEvent::extendedKeyCodeID != NULL);
+    CHECK_NULL(AwtKeyEvent::extendedKeyCodeID);
 
     CATCH_BAD_ALLOC;
 }