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 A6911200B8B for ; Tue, 4 Oct 2016 21:28:05 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A52FE160ADC; Tue, 4 Oct 2016 19:28:05 +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 E8AA2160AC7 for ; Tue, 4 Oct 2016 21:28:04 +0200 (CEST) Received: (qmail 11986 invoked by uid 500); 4 Oct 2016 19:28:04 -0000 Mailing-List: contact commits-help@beam.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@beam.incubator.apache.org Delivered-To: mailing list commits@beam.incubator.apache.org Received: (qmail 11974 invoked by uid 99); 4 Oct 2016 19:28:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Oct 2016 19:28:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id B6D291805DB for ; Tue, 4 Oct 2016 19:28:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -6.219 X-Spam-Level: X-Spam-Status: No, score=-6.219 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id IIaa39A6DkxA for ; Tue, 4 Oct 2016 19:28:02 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id 283D35F246 for ; Tue, 4 Oct 2016 19:28:01 +0000 (UTC) Received: (qmail 11954 invoked by uid 99); 4 Oct 2016 19:28:01 -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; Tue, 04 Oct 2016 19:28:01 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 4504DDFBA0; Tue, 4 Oct 2016 19:28:01 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: kenn@apache.org To: commits@beam.incubator.apache.org Date: Tue, 04 Oct 2016 19:28:01 -0000 Message-Id: <20e461f4accb457db30468ac0562770d@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/2] incubator-beam git commit: Avoid losing the encoded defaultValue. archived-at: Tue, 04 Oct 2016 19:28:05 -0000 Repository: incubator-beam Updated Branches: refs/heads/master 8462acbcb -> 087dcef1e Avoid losing the encoded defaultValue. Project: http://git-wip-us.apache.org/repos/asf/incubator-beam/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-beam/commit/0bd97efc Tree: http://git-wip-us.apache.org/repos/asf/incubator-beam/tree/0bd97efc Diff: http://git-wip-us.apache.org/repos/asf/incubator-beam/diff/0bd97efc Branch: refs/heads/master Commit: 0bd97efc0d764af17cdd8abdf43bff33bb21be2b Parents: 8462acb Author: Sela Authored: Tue Oct 4 18:12:38 2016 +0300 Committer: Sela Committed: Tue Oct 4 18:12:38 2016 +0300 ---------------------------------------------------------------------- .../src/main/java/org/apache/beam/sdk/util/PCollectionViews.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/0bd97efc/sdks/java/core/src/main/java/org/apache/beam/sdk/util/PCollectionViews.java ---------------------------------------------------------------------- diff --git a/sdks/java/core/src/main/java/org/apache/beam/sdk/util/PCollectionViews.java b/sdks/java/core/src/main/java/org/apache/beam/sdk/util/PCollectionViews.java index 14ae5c8..3b1fde9 100644 --- a/sdks/java/core/src/main/java/org/apache/beam/sdk/util/PCollectionViews.java +++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/util/PCollectionViews.java @@ -261,10 +261,9 @@ public class PCollectionViews { } // Lazily decode the default value once synchronized (this) { - if (encodedDefaultValue != null) { + if (encodedDefaultValue != null && defaultValue == null) { try { defaultValue = CoderUtils.decodeFromByteArray(valueCoder, encodedDefaultValue); - encodedDefaultValue = null; } catch (IOException e) { throw new RuntimeException("Unexpected IOException: ", e); }