beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@apache.org
Subject [1/2] incubator-beam git commit: Move ClassForDisplayJava8Test to correct package
Date Tue, 26 Apr 2016 01:12:21 GMT
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 <swegner@google.com>
Authored: Mon Apr 25 11:59:25 2016 -0700
Committer: Davor Bonaci <davor@google.com>
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<Object, Object> 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<Object, Object> 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);
+  }
+}


Mime
View raw message