From bb9485bcd97e2c7cf0f91c137eff19279d2afd29 Mon Sep 17 00:00:00 2001 From: Nathaniel Graham Date: Thu, 23 Jun 2016 15:09:07 +0200 Subject: [PATCH] Fix Java Coverity issue Fixing a possible error that Coverity pointed out in ompi_java_exceptionCheck. Signed-off-by: Nathaniel Graham --- ompi/mpi/java/c/mpi_MPI.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ompi/mpi/java/c/mpi_MPI.c b/ompi/mpi/java/c/mpi_MPI.c index e11ea9c73e5..3ad72965916 100644 --- a/ompi/mpi/java/c/mpi_MPI.c +++ b/ompi/mpi/java/c/mpi_MPI.c @@ -1157,9 +1157,8 @@ jboolean ompi_java_exceptionCheck(JNIEnv *env, int rc) (*env)->DeleteLocalRef(env, jmessage); return JNI_TRUE; } - else if (JNI_TRUE == jni_exception) { - return JNI_TRUE; - } + /* If we get here, a JNI error has occurred. */ + return JNI_TRUE; } void* ompi_java_attrSet(JNIEnv *env, jbyteArray jval)