changeset 54923:4958b60a70bc

8209455: [error-prone] JdkObsolete in jdk.management.agent Reviewed-by: alanb, jcbeyler
author iignatyev
date Thu, 14 Feb 2019 14:40:11 -0800
parents e16b61a1395e
children e77095ade618
files src/jdk.management.agent/share/classes/jdk/internal/agent/Agent.java
diffstat 1 files changed, 2 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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);