changeset 23718:0056bc7134f2

8028354: jstat does not provide enough information when fail to read data from remote JVM Reviewed-by: alanb, dholmes, mgronlun
author sla
date Fri, 04 Apr 2014 16:35:43 +0200
parents 6457189cd574
children 7c9e2106906c
files jdk/src/share/classes/sun/tools/jstat/Jstat.java
diffstat 1 files changed, 1 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/src/share/classes/sun/tools/jstat/Jstat.java	Fri Apr 04 18:16:50 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/jstat/Jstat.java	Fri Apr 04 16:35:43 2014 +0200
@@ -70,16 +70,7 @@
                 logSamples();
             }
         } catch (MonitorException e) {
-            if (e.getMessage() != null) {
-                System.err.println(e.getMessage());
-            } else {
-                Throwable cause = e.getCause();
-                if ((cause != null) && (cause.getMessage() != null)) {
-                    System.err.println(cause.getMessage());
-                } else {
-                    e.printStackTrace();
-                }
-            }
+            e.printStackTrace();
             System.exit(1);
         }
         System.exit(0);