8033573: [parfait] warning from b128 for share/native/sun/awt/splashscreen/java_awt_SplashScreen.c: JNI exception pending
authorserb
Tue, 25 Feb 2014 17:19:15 +0400
changeset 23320 fa1a77a296fc
parent 23319 b6523289a3b7
child 23321 7f1737ac8b30
8033573: [parfait] warning from b128 for share/native/sun/awt/splashscreen/java_awt_SplashScreen.c: JNI exception pending Reviewed-by: anthony, bagiras
jdk/src/share/native/sun/awt/splashscreen/java_awt_SplashScreen.c
--- a/jdk/src/share/native/sun/awt/splashscreen/java_awt_SplashScreen.c	Tue Feb 25 17:01:40 2014 +0400
+++ b/jdk/src/share/native/sun/awt/splashscreen/java_awt_SplashScreen.c	Tue Feb 25 17:19:15 2014 +0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -24,8 +24,9 @@
  */
 
 #include "splashscreen_impl.h"
+#include <jlong_md.h>
 #include <jni.h>
-#include <jlong_md.h>
+#include <jni_util.h>
 #include <sizecalc.h>
 
 JNIEXPORT jint JNICALL
@@ -212,8 +213,9 @@
     if (!splash) {
         return JNI_FALSE;
     }
+    pBytes = (*env)->GetByteArrayElements(env, data, NULL);
+    CHECK_NULL_RETURN(pBytes, JNI_FALSE);
     size = (*env)->GetArrayLength(env, data);
-    pBytes = (*env)->GetByteArrayElements(env, data, NULL);
     rc = SplashLoadMemory(pBytes, size);
     (*env)->ReleaseByteArrayElements(env, data, pBytes, JNI_ABORT);
     return rc ? JNI_TRUE : JNI_FALSE;