Skip to content

Commit 505ac1a

Browse files
committed
Fix MissingSummary errorprone Warnings Across Codebase
1 parent 3197d88 commit 505ac1a

86 files changed

Lines changed: 471 additions & 273 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1556,7 +1556,6 @@ class BeamModulePlugin implements Plugin<Project> {
15561556
"JavaUtilDate",
15571557
"JodaConstructors",
15581558
"MalformedInlineTag",
1559-
"MissingSummary",
15601559
"MixedMutabilityReturnType",
15611560
"PreferJavaTimeOverload",
15621561
"MutablePublicArray",

it/google-cloud-platform/src/main/java/org/apache/beam/it/gcp/datastream/DatastreamResourceManager.java

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,10 @@ private synchronized ConnectionProfile createJDBCSourceConnectionProfile(
182182
}
183183

184184
/**
185+
* Returns a SourceConfig object which is required to configure a Stream.
186+
*
185187
* @param sourceConnectionProfileId The ID of the connection profile.
186188
* @param source An object representing the JDBC source.
187-
* @return a SourceConfig object which is required to configure a Stream.
188189
*/
189190
public synchronized SourceConfig buildSourceConfig(
190191
String sourceConnectionProfileId, JDBCSource source) {
@@ -214,11 +215,12 @@ public synchronized SourceConfig buildSourceConfig(
214215
}
215216

216217
/**
218+
* Returns a Datastream GCS destination connection profile.
219+
*
217220
* @param connectionProfileId The ID of the GCS connection profile.
218221
* @param gcsBucketName The GCS Bucket to connect to.
219222
* @param gcsRootPath The Path prefix to specific gcs location. Can either be empty or must start
220223
* with '/'.
221-
* @return A Datastream GCS destination connection profile.
222224
*/
223225
public synchronized ConnectionProfile createGCSDestinationConnectionProfile(
224226
String connectionProfileId, String gcsBucketName, String gcsRootPath) {
@@ -266,11 +268,12 @@ public synchronized ConnectionProfile createGCSDestinationConnectionProfile(
266268
}
267269

268270
/**
271+
* Returns a DestinationConfig object representing a GCS destination configuration.
272+
*
269273
* @param connectionProfileId The ID of the connection profile.
270274
* @param path The Path prefix to specific GCS location. Can either be empty or must start with
271275
* '/'.
272276
* @param destinationOutputFormat The format of the files written to GCS.
273-
* @return A DestinationConfig object representing a GCS destination configuration.
274277
*/
275278
public synchronized DestinationConfig buildGCSDestinationConfig(
276279
String connectionProfileId, String path, DestinationOutputFormat destinationOutputFormat) {
@@ -294,8 +297,9 @@ public synchronized DestinationConfig buildGCSDestinationConfig(
294297
}
295298

296299
/**
300+
* Returns a Datastream BigQuery destination connection profile.
301+
*
297302
* @param connectionProfileId The ID of the connection profile.
298-
* @return A Datastream BigQuery destination connection profile.
299303
*/
300304
public synchronized ConnectionProfile createBQDestinationConnectionProfile(
301305
String connectionProfileId) {
@@ -334,10 +338,11 @@ public synchronized ConnectionProfile createBQDestinationConnectionProfile(
334338
}
335339

336340
/**
341+
* Returns a DestinationConfig object representing a BigQuery destination configuration.
342+
*
337343
* @param connectionProfileId The ID of the connection profile.
338344
* @param stalenessLimitSeconds The desired data freshness in seconds.
339345
* @param datasetId The ID of the BigQuery dataset.
340-
* @return A DestinationConfig object representing a BigQuery destination configuration.
341346
*/
342347
public synchronized DestinationConfig buildBQDestinationConfig(
343348
String connectionProfileId, long stalenessLimitSeconds, String datasetId) {
@@ -358,10 +363,11 @@ public synchronized DestinationConfig buildBQDestinationConfig(
358363
}
359364

360365
/**
366+
* Returns a Datastream stream object.
367+
*
361368
* @param streamId The ID of the stream.
362369
* @param sourceConfig A SourceConfig object representing the source configuration.
363370
* @param destinationConfig A DestinationConfig object representing the destination configuration.
364-
* @return A Datastream stream object.
365371
*/
366372
public synchronized Stream createStream(
367373
String streamId, SourceConfig sourceConfig, DestinationConfig destinationConfig) {

it/truthmatchers/src/main/java/org/apache/beam/it/truthmatchers/ListAccumulator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public int count() {
5454
return this.backingList.size();
5555
}
5656

57-
/** @return the internal backing list being accumulated. */
57+
/** Returns the internal backing list being accumulated. */
5858
public List<T> getBackingList() {
5959
return this.backingList;
6060
}

runners/core-java/src/main/java/org/apache/beam/runners/core/DoFnRunner.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,9 @@ public interface DoFnRunner<InputT extends @Nullable Object, OutputT extends @Nu
6464
BoundedWindow window, Instant timestamp, KeyT key);
6565

6666
/**
67+
* Returns the underlying fn instance.
68+
*
6769
* @since 2.5.0
68-
* @return the underlying fn instance.
6970
*/
7071
DoFn<InputT, OutputT> getFn();
7172
}

runners/core-java/src/main/java/org/apache/beam/runners/core/PushbackSideInputDoFnRunner.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,9 @@ <KeyT> void onTimer(
6161
void finishBundle();
6262

6363
/**
64+
* Returns the underlying fn instance.
65+
*
6466
* @since 2.5.0
65-
* @return the underlying fn instance.
6667
*/
6768
DoFn<InputT, OutputT> getFn();
6869
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ public synchronized boolean contains(@Nonnull List<String> value) {
276276
}
277277
}
278278

279-
/** @return true if this {@link BoundedTrieData} is empty else false. */
279+
/** Returns true if this {@link BoundedTrieData} is empty else false. */
280280
public boolean isEmpty() {
281281
return (root == null || root.children.isEmpty()) && (singleton == null || singleton.isEmpty());
282282
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public String getName() {
7474
return urn.split(":", 2)[1];
7575
}
7676

77-
/** @return the urn of this MonitoringInfo metric. */
77+
/** Returns the urn of this MonitoringInfo metric. */
7878
public String getUrn() {
7979
return this.urn;
8080
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public void reset() {
4545
}
4646
}
4747

48-
/** @return Execution Time MonitoringInfos based on the tracked start or finish function. */
48+
/** Returns execution Time MonitoringInfos based on the tracked start or finish function. */
4949
public List<MonitoringInfo> getExecutionTimeMonitoringInfos() {
5050
List<MonitoringInfo> monitoringInfos = new ArrayList<MonitoringInfo>();
5151
for (SimpleExecutionState state : executionStates) {

runners/core-java/src/main/java/org/apache/beam/runners/core/triggers/AfterWatermarkStateMachine.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public static FromEndOfWindow pastEndOfWindow() {
6666
return new FromEndOfWindow();
6767
}
6868

69-
/** @see AfterWatermarkStateMachine */
69+
/** See {@link AfterWatermarkStateMachine}. */
7070
public static class AfterWatermarkEarlyAndLate extends TriggerStateMachine {
7171

7272
private static final int EARLY_INDEX = 0;

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -469,20 +469,20 @@ public PackageAttributes withPackageName(String overridePackageName) {
469469
getSource(), getBytes(), newDestination, getSize(), getHash());
470470
}
471471

472-
/** @return the file to be uploaded, if any */
472+
/** Returns the file to be uploaded, if any. */
473473
public abstract @Nullable File getSource();
474474

475-
/** @return the bytes to be uploaded, if any */
475+
/** Returns the bytes to be uploaded, if any. */
476476
@SuppressWarnings("mutable")
477477
public abstract byte @Nullable [] getBytes();
478478

479-
/** @return the dataflowPackage */
479+
/** Returns the dataflowPackage. */
480480
public abstract DataflowPackage getDestination();
481481

482-
/** @return the size */
482+
/** Returns the size. */
483483
public abstract long getSize();
484484

485-
/** @return the hash */
485+
/** Returns the hash. */
486486
public abstract String getHash();
487487

488488
public String getSourceDescription() {

0 commit comments

Comments
 (0)