From commits-return-6149-archive-asf-public=cust-asf.ponee.io@groovy.apache.org Wed Apr 4 09:13:53 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 78A0218064F for ; Wed, 4 Apr 2018 09:13:52 +0200 (CEST) Received: (qmail 82233 invoked by uid 500); 4 Apr 2018 07:13:51 -0000 Mailing-List: contact commits-help@groovy.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@groovy.apache.org Delivered-To: mailing list commits@groovy.apache.org Received: (qmail 82224 invoked by uid 99); 4 Apr 2018 07:13:51 -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; Wed, 04 Apr 2018 07:13:51 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 2EF62DFADE; Wed, 4 Apr 2018 07:13:50 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sunlan@apache.org To: commits@groovy.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: groovy git commit: Revert "'new String()' is redundant" Date: Wed, 4 Apr 2018 07:13:50 +0000 (UTC) Repository: groovy Updated Branches: refs/heads/master 08b98ddbb -> 600e08b09 Revert "'new String()' is redundant" This reverts commit b07369a Project: http://git-wip-us.apache.org/repos/asf/groovy/repo Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/600e08b0 Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/600e08b0 Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/600e08b0 Branch: refs/heads/master Commit: 600e08b09c46f1a18fa856ee9d46de7abcead2dc Parents: 08b98dd Author: sunlan Authored: Wed Apr 4 15:13:41 2018 +0800 Committer: sunlan Committed: Wed Apr 4 15:13:41 2018 +0800 ---------------------------------------------------------------------- .../java/org/apache/groovy/jsondirect/DirectFastStringService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/groovy/blob/600e08b0/subprojects/groovy-json-direct/src/main/java/org/apache/groovy/jsondirect/DirectFastStringService.java ---------------------------------------------------------------------- diff --git a/subprojects/groovy-json-direct/src/main/java/org/apache/groovy/jsondirect/DirectFastStringService.java b/subprojects/groovy-json-direct/src/main/java/org/apache/groovy/jsondirect/DirectFastStringService.java index a2ed84a..0d7d4ad 100644 --- a/subprojects/groovy-json-direct/src/main/java/org/apache/groovy/jsondirect/DirectFastStringService.java +++ b/subprojects/groovy-json-direct/src/main/java/org/apache/groovy/jsondirect/DirectFastStringService.java @@ -37,7 +37,7 @@ public class DirectFastStringService implements FastStringService { @Override public String noCopyStringFromChars(char[] chars) { if (WRITE_TO_FINAL_FIELDS) { - String string = ""; + String string = new String(); UNSAFE.putObject(string, STRING_VALUE_FIELD_OFFSET, chars); return string; } else {