changeset 9681:8a7363488639

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 5ed0f02131ad
children 982e7ce47e3e
files src/share/classes/sun/tools/jstat/Jstat.java
diffstat 1 files changed, 1 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/tools/jstat/Jstat.java	Fri Apr 04 18:16:50 2014 +0400
+++ b/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);