beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ming...@apache.org
Subject [2/2] beam git commit: Switch to unmodifiableList
Date Thu, 17 Aug 2017 18:32:36 GMT
Switch to unmodifiableList


Project: http://git-wip-us.apache.org/repos/asf/beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/c2acb54f
Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/c2acb54f
Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/c2acb54f

Branch: refs/heads/DSL_SQL
Commit: c2acb54f6756786bcfe12e9faf32950fd6260c5e
Parents: 670c2ee
Author: Tyler Akidau <takidau@apache.org>
Authored: Wed Aug 16 09:17:01 2017 -0700
Committer: Tyler Akidau <takidau@apache.org>
Committed: Wed Aug 16 09:17:01 2017 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/beam/sdk/coders/BeamRecordCoder.java    | 4 ++--
 .../src/main/java/org/apache/beam/sdk/values/BeamRecord.java     | 4 ++--
 .../org/apache/beam/sdk/extensions/sql/BeamRecordSqlType.java    | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam/blob/c2acb54f/sdks/java/core/src/main/java/org/apache/beam/sdk/coders/BeamRecordCoder.java
----------------------------------------------------------------------
diff --git a/sdks/java/core/src/main/java/org/apache/beam/sdk/coders/BeamRecordCoder.java
b/sdks/java/core/src/main/java/org/apache/beam/sdk/coders/BeamRecordCoder.java
index 79b727f..70fbf58 100644
--- a/sdks/java/core/src/main/java/org/apache/beam/sdk/coders/BeamRecordCoder.java
+++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/coders/BeamRecordCoder.java
@@ -17,12 +17,12 @@
  */
 package org.apache.beam.sdk.coders;
 
-import com.google.common.collect.ImmutableList;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.util.ArrayList;
 import java.util.BitSet;
+import java.util.Collections;
 import java.util.List;
 import org.apache.beam.sdk.annotations.Experimental;
 import org.apache.beam.sdk.values.BeamRecord;
@@ -106,6 +106,6 @@ public class BeamRecordCoder extends CustomCoder<BeamRecord> {
   }
 
   public List<Coder> getCoders() {
-    return ImmutableList.copyOf(coders);
+    return Collections.unmodifiableList(coders);
   }
 }

http://git-wip-us.apache.org/repos/asf/beam/blob/c2acb54f/sdks/java/core/src/main/java/org/apache/beam/sdk/values/BeamRecord.java
----------------------------------------------------------------------
diff --git a/sdks/java/core/src/main/java/org/apache/beam/sdk/values/BeamRecord.java b/sdks/java/core/src/main/java/org/apache/beam/sdk/values/BeamRecord.java
index 1ff2c9f..999f27a 100644
--- a/sdks/java/core/src/main/java/org/apache/beam/sdk/values/BeamRecord.java
+++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/values/BeamRecord.java
@@ -17,11 +17,11 @@
  */
 package org.apache.beam.sdk.values;
 
-import com.google.common.collect.ImmutableList;
 import java.io.Serializable;
 import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.Date;
 import java.util.GregorianCalendar;
 import java.util.List;
@@ -283,7 +283,7 @@ public class BeamRecord implements Serializable {
    * Return the list of data values.
    */
   public List<Object> getDataValues() {
-    return ImmutableList.copyOf(dataValues);
+    return Collections.unmodifiableList(dataValues);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/beam/blob/c2acb54f/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/BeamRecordSqlType.java
----------------------------------------------------------------------
diff --git a/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/BeamRecordSqlType.java
b/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/BeamRecordSqlType.java
index ac6f278..982494a 100644
--- a/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/BeamRecordSqlType.java
+++ b/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/BeamRecordSqlType.java
@@ -17,10 +17,10 @@
  */
 package org.apache.beam.sdk.extensions.sql;
 
-import com.google.common.collect.ImmutableList;
 import java.math.BigDecimal;
 import java.sql.Types;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.Date;
 import java.util.GregorianCalendar;
 import java.util.HashMap;
@@ -156,7 +156,7 @@ public class BeamRecordSqlType extends BeamRecordType {
   }
 
   public List<Integer> getFieldTypes() {
-    return ImmutableList.copyOf(fieldTypes);
+    return Collections.unmodifiableList(fieldTypes);
   }
 
   public Integer getFieldTypeByIndex(int index){


Mime
View raw message