Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 55067200B9C for ; Fri, 2 Sep 2016 04:31:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 53A7E160AB5; Fri, 2 Sep 2016 02:31:23 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7D998160AB7 for ; Fri, 2 Sep 2016 04:31:22 +0200 (CEST) Received: (qmail 86411 invoked by uid 500); 2 Sep 2016 02:31:21 -0000 Mailing-List: contact dev-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list dev@cloudstack.apache.org Received: (qmail 86399 invoked by uid 99); 2 Sep 2016 02:31:21 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Sep 2016 02:31:21 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 275B4E00DB; Fri, 2 Sep 2016 02:31:21 +0000 (UTC) From: jburwell To: dev@cloudstack.apache.org Reply-To: dev@cloudstack.apache.org References: In-Reply-To: Subject: [GitHub] cloudstack pull request #1660: CLOUDSTACK-9470: [BLOCKER] Bug in SshHelper a... Content-Type: text/plain Message-Id: <20160902023121.275B4E00DB@git1-us-west.apache.org> Date: Fri, 2 Sep 2016 02:31:21 +0000 (UTC) archived-at: Fri, 02 Sep 2016 02:31:23 -0000 Github user jburwell commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1660#discussion_r77285299 --- Diff: utils/src/main/java/com/cloud/utils/ssh/SshHelper.java --- @@ -196,6 +201,16 @@ public static void scpTo(String host, int port, String user, File pemKeyFile, St String result = sbResult.toString(); + if (StringUtils.isBlank(result)) { + try { + result = IOUtils.toString(stdout, UTF8); --- End diff -- Rather than use a homegrown string constant, pass ``StandardCharsets.UTF_8`` instead. An additional benefit is that it is a ``Charset`` instance which provides greater type safety. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---