Return-Path: X-Original-To: apmail-beam-commits-archive@minotaur.apache.org Delivered-To: apmail-beam-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9AB9A19D38 for ; Tue, 26 Apr 2016 01:12:25 +0000 (UTC) Received: (qmail 58845 invoked by uid 500); 26 Apr 2016 01:12:25 -0000 Delivered-To: apmail-beam-commits-archive@beam.apache.org Received: (qmail 58793 invoked by uid 500); 26 Apr 2016 01:12:25 -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 58784 invoked by uid 99); 26 Apr 2016 01:12:25 -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, 26 Apr 2016 01:12:25 +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 1F25918044E for ; Tue, 26 Apr 2016 01:12:25 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -3.221 X-Spam-Level: X-Spam-Status: No, score=-3.221 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=-0.001] 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 scc25NioRqVK for ; Tue, 26 Apr 2016 01:12:23 +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 DE6565F39B for ; Tue, 26 Apr 2016 01:12:22 +0000 (UTC) Received: (qmail 58696 invoked by uid 99); 26 Apr 2016 01:12:22 -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, 26 Apr 2016 01:12:22 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 02645DFD5B; Tue, 26 Apr 2016 01:12:21 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: davor@apache.org To: commits@beam.incubator.apache.org Date: Tue, 26 Apr 2016 01:12:21 -0000 Message-Id: <7251172daf0a49c9a9d78deb86765071@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/2] incubator-beam git commit: Move ClassForDisplayJava8Test to correct package Repository: incubator-beam Updated Branches: refs/heads/master 0f7b81615 -> ebc703590 Move ClassForDisplayJava8Test to correct package Project: http://git-wip-us.apache.org/repos/asf/incubator-beam/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-beam/commit/7aef7a03 Tree: http://git-wip-us.apache.org/repos/asf/incubator-beam/tree/7aef7a03 Diff: http://git-wip-us.apache.org/repos/asf/incubator-beam/diff/7aef7a03 Branch: refs/heads/master Commit: 7aef7a03a43e266be7a29ef31033045411a92324 Parents: 0f7b816 Author: Scott Wegner Authored: Mon Apr 25 11:59:25 2016 -0700 Committer: Davor Bonaci Committed: Mon Apr 25 17:57:42 2016 -0700 ---------------------------------------------------------------------- .../display/ClassForDisplayJava8Test.java | 46 -------------------- .../display/ClassForDisplayJava8Test.java | 45 +++++++++++++++++++ 2 files changed, 45 insertions(+), 46 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/7aef7a03/sdks/java/java8tests/src/test/java/com/google/cloud/dataflow/sdk/transforms/display/ClassForDisplayJava8Test.java ---------------------------------------------------------------------- diff --git a/sdks/java/java8tests/src/test/java/com/google/cloud/dataflow/sdk/transforms/display/ClassForDisplayJava8Test.java b/sdks/java/java8tests/src/test/java/com/google/cloud/dataflow/sdk/transforms/display/ClassForDisplayJava8Test.java deleted file mode 100644 index 4db235f..0000000 --- a/sdks/java/java8tests/src/test/java/com/google/cloud/dataflow/sdk/transforms/display/ClassForDisplayJava8Test.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.dataflow.sdk.transforms.display; - -import org.apache.beam.sdk.transforms.SerializableFunction; -import org.apache.beam.sdk.transforms.display.ClassForDisplay; -import org.apache.beam.sdk.util.SerializableUtils; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -import java.io.Serializable; - -/** - * Java 8 tests for {@link ClassForDisplay}. - */ -@RunWith(JUnit4.class) -public class ClassForDisplayJava8Test implements Serializable { - @Test - public void testLambdaClassSerialization() { - final SerializableFunction f = x -> x; - Serializable myClass = new Serializable() { - // Class references for lambdas do not serialize, which is why we support ClassForDisplay - // Specifically, the following would not work: - // Class clazz = f.getClass(); - ClassForDisplay javaClass = ClassForDisplay.fromInstance(f); - }; - - SerializableUtils.ensureSerializable(myClass); - } -} http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/7aef7a03/sdks/java/java8tests/src/test/java/org/apache/beam/sdk/transforms/display/ClassForDisplayJava8Test.java ---------------------------------------------------------------------- diff --git a/sdks/java/java8tests/src/test/java/org/apache/beam/sdk/transforms/display/ClassForDisplayJava8Test.java b/sdks/java/java8tests/src/test/java/org/apache/beam/sdk/transforms/display/ClassForDisplayJava8Test.java new file mode 100644 index 0000000..8889a78 --- /dev/null +++ b/sdks/java/java8tests/src/test/java/org/apache/beam/sdk/transforms/display/ClassForDisplayJava8Test.java @@ -0,0 +1,45 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.beam.sdk.transforms.display; + +import org.apache.beam.sdk.transforms.SerializableFunction; +import org.apache.beam.sdk.util.SerializableUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +import java.io.Serializable; + +/** + * Java 8 tests for {@link ClassForDisplay}. + */ +@RunWith(JUnit4.class) +public class ClassForDisplayJava8Test implements Serializable { + @Test + public void testLambdaClassSerialization() { + final SerializableFunction f = x -> x; + Serializable myClass = new Serializable() { + // Class references for lambdas do not serialize, which is why we support ClassForDisplay + // Specifically, the following would not work: + // Class clazz = f.getClass(); + ClassForDisplay javaClass = ClassForDisplay.fromInstance(f); + }; + + SerializableUtils.ensureSerializable(myClass); + } +}