8209455: [error-prone] JdkObsolete in jdk.management.agent
authoriignatyev
Thu, 14 Feb 2019 14:40:11 -0800
changeset 53760 4958b60a70bc
parent 53759 e16b61a1395e
child 53761 e77095ade618
8209455: [error-prone] JdkObsolete in jdk.management.agent Reviewed-by: alanb, jcbeyler
src/jdk.management.agent/share/classes/jdk/internal/agent/Agent.java
--- a/src/jdk.management.agent/share/classes/jdk/internal/agent/Agent.java	Thu Feb 14 14:19:29 2019 -0800
+++ b/src/jdk.management.agent/share/classes/jdk/internal/agent/Agent.java	Thu Feb 14 14:40:11 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2019, 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
@@ -663,11 +663,7 @@
         System.err.print(getText("agent.err.error") + ": " + keyText);
 
         if (params != null && params.length != 0) {
-           StringBuffer message = new StringBuffer(params[0]);
-           for (int i = 1; i < params.length; i++) {
-               message.append(" " + params[i]);
-           }
-           System.err.println(": " + message);
+           System.err.println(": " + String.join(" ", params));
         }
         e.printStackTrace();
         throw new RuntimeException(e);