Skip to content

Commit 76d56fb

Browse files
committed
fix checkstyle
1 parent dca2a6c commit 76d56fb

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

runners/core-java/src/main/java/org/apache/beam/runners/core/metrics/BoundedTrieData.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,8 @@ public BoundedTrieNode() {
345345
* @param truncated Whether this node is truncated.
346346
* @param size The size of the subtree rooted at this node.
347347
*/
348-
public BoundedTrieNode(@Nonnull Map<String, BoundedTrieNode> children, boolean truncated, int size) {
348+
public BoundedTrieNode(
349+
@Nonnull Map<String, BoundedTrieNode> children, boolean truncated, int size) {
349350
this.children = children;
350351
this.size = size;
351352
this.truncated = truncated;

runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/DataflowMetrics.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ private DistributionResult getDistributionValue(MetricUpdate metricUpdate) {
241241

242242
/** Translate Struct proto returned by Dataflow API client to BoundedTrieData. */
243243
@VisibleForTesting
244-
@SuppressWarnings("ReferenceEquality") // compare with protobuf Struct default instance
244+
@SuppressWarnings("ReferenceEquality") // Compare with protobuf Struct default instance
245245
static BoundedTrieData trieFromStruct(com.google.protobuf.Struct responseProto) {
246246
Map<String, com.google.protobuf.Value> fieldsMap = responseProto.getFieldsMap();
247247
int bound = 0;
@@ -271,7 +271,7 @@ static BoundedTrieData trieFromStruct(com.google.protobuf.Struct responseProto)
271271
/**
272272
* Translate Struct proto returned by Dataflow API client to BoundedTrieData.BoundedTrieNode.
273273
*/
274-
@SuppressWarnings("ReferenceEquality") // compare with protobuf Struct default instance
274+
@SuppressWarnings({"ReferenceEquality"}) // Compare with protobuf Struct default instance
275275
private static BoundedTrieData.BoundedTrieNode trieNodeFromStruct(
276276
com.google.protobuf.Struct responseProto) {
277277
Map<String, com.google.protobuf.Value> fieldsMap = responseProto.getFieldsMap();

runners/google-cloud-dataflow-java/src/test/java/org/apache/beam/runners/dataflow/DataflowMetricsTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
import com.google.api.services.dataflow.model.JobMetrics;
4040
import com.google.api.services.dataflow.model.MetricStructuredName;
4141
import com.google.api.services.dataflow.model.MetricUpdate;
42-
import com.google.protobuf.Struct;
4342
import com.google.protobuf.TextFormat;
4443
import com.google.protobuf.TextFormat.ParseException;
4544
import java.io.IOException;
@@ -328,7 +327,8 @@ public void testSingletonBoundedTrieFromMessage() throws ParseException {
328327
+ " }\n"
329328
+ " }\n"
330329
+ " }";
331-
Struct response = TextFormat.parse(textProto, Struct.class);
330+
com.google.protobuf.Struct response =
331+
TextFormat.parse(textProto, com.google.protobuf.Struct.class);
332332
BoundedTrieData result = DataflowMetrics.DataflowMetricResultExtractor.trieFromStruct(response);
333333
assertEquals(
334334
"BoundedTrieData({'pubsub:topic:`google.com:abc`.some-topicfalse'})", result.toString());
@@ -416,7 +416,8 @@ public void testNestedBoundedTrieFromMessage() throws ParseException {
416416
+ " }\n"
417417
+ " }\n"
418418
+ "}";
419-
Struct response = TextFormat.parse(textProto, Struct.class);
419+
com.google.protobuf.Struct response =
420+
TextFormat.parse(textProto, com.google.protobuf.Struct.class);
420421
BoundedTrieData result = DataflowMetrics.DataflowMetricResultExtractor.trieFromStruct(response);
421422
assertEquals("BoundedTrieData({'gcs:some-bucket.some-folder/true'})", result.toString());
422423
}

0 commit comments

Comments
 (0)