beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dhalp...@apache.org
Subject [2/3] incubator-beam git commit: PubsubClient: fix use of blacklisted Preconditions
Date Tue, 26 Apr 2016 23:29:59 GMT
PubsubClient: fix use of blacklisted Preconditions


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

Branch: refs/heads/master
Commit: 2b3b140da0d015d38f556369c199a9fd0565c3b8
Parents: 8d6d59e
Author: Dan Halperin <dhalperi@google.com>
Authored: Tue Apr 26 15:50:04 2016 -0700
Committer: Dan Halperin <dhalperi@google.com>
Committed: Tue Apr 26 15:50:04 2016 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/beam/sdk/io/PubsubClient.java     | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/2b3b140d/sdks/java/core/src/main/java/org/apache/beam/sdk/io/PubsubClient.java
----------------------------------------------------------------------
diff --git a/sdks/java/core/src/main/java/org/apache/beam/sdk/io/PubsubClient.java b/sdks/java/core/src/main/java/org/apache/beam/sdk/io/PubsubClient.java
index ce5979b..f92b480 100644
--- a/sdks/java/core/src/main/java/org/apache/beam/sdk/io/PubsubClient.java
+++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/io/PubsubClient.java
@@ -18,7 +18,7 @@
 
 package org.apache.beam.sdk.io;
 
-import com.google.api.client.repackaged.com.google.common.base.Preconditions;
+import static com.google.common.base.Preconditions.checkState;
 
 import java.io.IOException;
 import java.io.Serializable;
@@ -88,7 +88,7 @@ public interface PubsubClient extends AutoCloseable {
 
     public String getV1Beta1Path() {
       String[] splits = path.split("/");
-      Preconditions.checkState(splits.length == 4);
+      checkState(splits.length == 4);
       return String.format("/subscriptions/%s/%s", splits[1], splits[3]);
     }
 
@@ -136,7 +136,7 @@ public interface PubsubClient extends AutoCloseable {
 
     public String getV1Beta1Path() {
       String[] splits = path.split("/");
-      Preconditions.checkState(splits.length == 4);
+      checkState(splits.length == 4);
       return String.format("/topics/%s/%s", splits[1], splits[3]);
     }
 


Mime
View raw message