From 7142b60efc2f5d9f398d416897127d7d5f144e6a Mon Sep 17 00:00:00 2001 From: Staffan Larsen Date: Fri, 30 May 2014 19:13:07 +0200 Subject: [PATCH] 8044398: Attach code should propagate errors in Diagnostic Commands as errors Reviewed-by: dcubed, mgronlun --- hotspot/src/share/vm/services/attachListener.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hotspot/src/share/vm/services/attachListener.cpp b/hotspot/src/share/vm/services/attachListener.cpp index 9d68175518a..2321f084dc5 100644 --- a/hotspot/src/share/vm/services/attachListener.cpp +++ b/hotspot/src/share/vm/services/attachListener.cpp @@ -162,10 +162,7 @@ static jint jcmd(AttachOperation* op, outputStream* out) { java_lang_Throwable::print(PENDING_EXCEPTION, out); out->cr(); CLEAR_PENDING_EXCEPTION; - // The exception has been printed on the output stream - // If the JVM returns JNI_ERR, the attachAPI throws a generic I/O - // exception and the content of the output stream is not processed. - // By returning JNI_OK, the exception will be displayed on the client side + return JNI_ERR; } return JNI_OK; }