Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Preconditions.checkArgument;

import com.google.api.services.bigquery.model.TableSchema;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
Expand Down Expand Up @@ -54,13 +53,7 @@
"argument",
"return"
})
@SuppressFBWarnings(
value = "CT_CONSTRUCTOR_THROW",
justification =
"Pre-existing finding, not triaged yet."
+ " Making the class final or moving the throwing code"
+ " into a static factory method may fix it.")
public class SchemasUtils {
public final class SchemasUtils {

/* Logger for class.*/
private static final Logger LOG = LoggerFactory.getLogger(SchemasUtils.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/
package org.apache.beam.examples.subprocess.utils;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
Expand Down Expand Up @@ -89,13 +88,7 @@ private static void releaseSemaphore(String binaryName) throws IllegalStateExcep
}

/** Permit class for access to worker cpu resources. */
@SuppressFBWarnings(
value = "CT_CONSTRUCTOR_THROW",
justification =
"Pre-existing finding, not triaged yet."
+ " Making the class final or moving the throwing code"
+ " into a static factory method may fix it.")
public static class Permit implements AutoCloseable {
public static final class Permit implements AutoCloseable {

private String binaryName;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/
package org.apache.beam.examples.subprocess.utils;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import org.apache.beam.examples.subprocess.configuration.SubProcessConfiguration;
import org.apache.beam.sdk.coders.DefaultCoder;
import org.apache.beam.sdk.extensions.avro.coders.AvroCoder;
Expand All @@ -27,13 +26,7 @@
@SuppressWarnings({
"nullness" // TODO(https://github.com/apache/beam/issues/20497)
})
@SuppressFBWarnings(
value = "CT_CONSTRUCTOR_THROW",
justification =
"Pre-existing finding, not triaged yet."
+ " Making the class final or moving the throwing code"
+ " into a static factory method may fix it.")
public class ExecutableFile {
public final class ExecutableFile {

String fileName;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/
package org.apache.beam.it.clickhouse;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
Expand Down Expand Up @@ -45,14 +44,8 @@
*
* <p>The class is thread-safe.
*/
@SuppressFBWarnings(
value = "CT_CONSTRUCTOR_THROW",
justification =
"Pre-existing finding, not triaged yet."
+ " Making the class final or moving the throwing code"
+ " into a static factory method may fix it.")
public class ClickHouseResourceManager extends TestContainerResourceManager<GenericContainer<?>>
implements ResourceManager {
public final class ClickHouseResourceManager
extends TestContainerResourceManager<GenericContainer<?>> implements ResourceManager {

private static final Logger LOG = LoggerFactory.getLogger(ClickHouseResourceManager.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Iterables;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashSet;
Expand Down Expand Up @@ -78,13 +77,7 @@
*
* <p>The class is thread-safe.
*/
@SuppressFBWarnings(
value = "CT_CONSTRUCTOR_THROW",
justification =
"Pre-existing finding, not triaged yet."
+ " Making the class final or moving the throwing code"
+ " into a static factory method may fix it.")
public class BigtableResourceManager implements ResourceManager {
public final class BigtableResourceManager implements ResourceManager {

private static final Logger LOG = LoggerFactory.getLogger(BigtableResourceManager.class);
private static final String DEFAULT_CLUSTER_ZONE = "us-central1-b";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import com.splunk.ResultsReader;
import com.splunk.ResultsReaderXml;
import com.splunk.ServiceArgs;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.time.Duration;
Expand Down Expand Up @@ -61,13 +60,7 @@
* <p>Note: The Splunk TestContainer will only run on M1 Mac's if the Docker version is >= 4.16.0
* and the "Use Rosetta for x86/amd64 emulation on Apple Silicon" setting is enabled.
*/
@SuppressFBWarnings(
value = "CT_CONSTRUCTOR_THROW",
justification =
"Pre-existing finding, not triaged yet."
+ " Making the class final or moving the throwing code"
+ " into a static factory method may fix it.")
public class SplunkResourceManager extends TestContainerResourceManager<SplunkContainer>
public final class SplunkResourceManager extends TestContainerResourceManager<SplunkContainer>
implements ResourceManager {

private static final Logger LOG = LoggerFactory.getLogger(SplunkResourceManager.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.Serializable;
Expand All @@ -33,13 +32,7 @@
* Holds a {@link PipelineOptions} in JSON serialized form and calls {@link
* FileSystems#setDefaultPipelineOptions(PipelineOptions)} on construction or on deserialization.
*/
@SuppressFBWarnings(
value = "CT_CONSTRUCTOR_THROW",
justification =
"Pre-existing finding, not triaged yet."
+ " Making the class final or moving the throwing code"
+ " into a static factory method may fix it.")
public class SerializablePipelineOptions implements Serializable {
public final class SerializablePipelineOptions implements Serializable {
private static final ObjectMapper MAPPER =
new ObjectMapper()
.registerModules(ObjectMapper.findModules(ReflectHelpers.findClassLoader()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,9 @@
"nullness" // TODO(https://github.com/apache/beam/issues/20497)
})
@SuppressFBWarnings(
value = {"IS2_INCONSISTENT_SYNC", "CT_CONSTRUCTOR_THROW"},
justification =
"Some access on purpose are left unsynchronized."
+ " Pre-existing finding, not triaged yet."
+ " Making the class final or moving the throwing code"
+ " into a static factory method may fix it.")
public class BoundedTrieData implements Serializable {
value = "IS2_INCONSISTENT_SYNC",
justification = "Some access on purpose are left unsynchronized")
public final class BoundedTrieData implements Serializable {

private static final int DEFAULT_BOUND = 100; // Default maximum size of the trie

Expand Down Expand Up @@ -286,7 +282,7 @@ public boolean isEmpty() {
}

@Override
public final boolean equals(@Nullable Object other) {
public boolean equals(@Nullable Object other) {
if (this == other) {
return true;
}
Expand All @@ -298,12 +294,12 @@ public final boolean equals(@Nullable Object other) {
}

@Override
public final int hashCode() {
public int hashCode() {
return this.asTrie().hashCode();
}

@Override
public final String toString() {
public String toString() {
return "BoundedTrieData(" + this.asTrie() + ")";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.auto.service.AutoService;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
Expand Down Expand Up @@ -131,13 +130,7 @@
"keyfor",
"nullness"
}) // TODO(https://github.com/apache/beam/issues/20497)
@SuppressFBWarnings(
value = "CT_CONSTRUCTOR_THROW",
justification =
"Pre-existing finding, not triaged yet."
+ " Making the class final or moving the throwing code"
+ " into a static factory method may fix it.")
public class FlinkStreamingPortablePipelineTranslator
public final class FlinkStreamingPortablePipelineTranslator
implements FlinkPortablePipelineTranslator<
FlinkStreamingPortablePipelineTranslator.StreamingTranslationContext> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/
package org.apache.beam.runners.flink.translation.wrappers.streaming.io;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedHashMap;
Expand Down Expand Up @@ -68,13 +67,8 @@
"rawtypes", // TODO(https://github.com/apache/beam/issues/20447)
"nullness" // TODO(https://github.com/apache/beam/issues/20497)
})
@SuppressFBWarnings(
value = "CT_CONSTRUCTOR_THROW",
justification =
"Pre-existing finding, not triaged yet."
+ " Making the class final or moving the throwing code"
+ " into a static factory method may fix it.")
public class UnboundedSourceWrapper<OutputT, CheckpointMarkT extends UnboundedSource.CheckpointMark>
public final class UnboundedSourceWrapper<
OutputT, CheckpointMarkT extends UnboundedSource.CheckpointMark>
extends RichParallelSourceFunction<WindowedValue<ValueWithRecordId<OutputT>>>
implements BeamStoppableFunction,
CheckpointListener,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/
package org.apache.beam.runners.flink.translation.wrappers.streaming.state;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.io.IOException;
import java.util.Collections;
import java.util.HashSet;
Expand Down Expand Up @@ -104,13 +103,7 @@
"rawtypes", // TODO(https://github.com/apache/beam/issues/20447)
"nullness" // TODO(https://github.com/apache/beam/issues/20497)
})
@SuppressFBWarnings(
value = "CT_CONSTRUCTOR_THROW",
justification =
"Pre-existing finding, not triaged yet."
+ " Making the class final or moving the throwing code"
+ " into a static factory method may fix it.")
public class FlinkStateInternals<K> implements StateInternals {
public final class FlinkStateInternals<K> implements StateInternals {

private static final StateNamespace globalWindowNamespace =
StateNamespaces.window(GlobalWindow.Coder.INSTANCE, GlobalWindow.INSTANCE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.auto.service.AutoService;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
Expand Down Expand Up @@ -131,13 +130,7 @@
"keyfor",
"nullness"
}) // TODO(https://github.com/apache/beam/issues/20497)
@SuppressFBWarnings(
value = "CT_CONSTRUCTOR_THROW",
justification =
"Pre-existing finding, not triaged yet."
+ " Making the class final or moving the throwing code"
+ " into a static factory method may fix it.")
public class FlinkStreamingPortablePipelineTranslator
public final class FlinkStreamingPortablePipelineTranslator
implements FlinkPortablePipelineTranslator<
FlinkStreamingPortablePipelineTranslator.StreamingTranslationContext> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/
package org.apache.beam.runners.flink.translation.wrappers.streaming.io;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedHashMap;
Expand Down Expand Up @@ -67,13 +66,8 @@
"rawtypes", // TODO(https://github.com/apache/beam/issues/20447)
"nullness" // TODO(https://github.com/apache/beam/issues/20497)
})
@SuppressFBWarnings(
value = "CT_CONSTRUCTOR_THROW",
justification =
"Pre-existing finding, not triaged yet."
+ " Making the class final or moving the throwing code"
+ " into a static factory method may fix it.")
public class UnboundedSourceWrapper<OutputT, CheckpointMarkT extends UnboundedSource.CheckpointMark>
public final class UnboundedSourceWrapper<
OutputT, CheckpointMarkT extends UnboundedSource.CheckpointMark>
extends RichParallelSourceFunction<WindowedValue<ValueWithRecordId<OutputT>>>
implements BeamStoppableFunction,
CheckpointListener,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/
package org.apache.beam.runners.flink.translation.wrappers.streaming.io.source;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
Expand All @@ -40,13 +39,7 @@
import org.slf4j.LoggerFactory;

/** Splits a Beam source and assigns its splits to Flink source readers round-robin. */
@SuppressFBWarnings(
value = "CT_CONSTRUCTOR_THROW",
justification =
"Pre-existing finding, not triaged yet."
+ " Making the class final or moving the throwing code"
+ " into a static factory method may fix it.")
public class FlinkSourceSplitEnumerator<T>
public final class FlinkSourceSplitEnumerator<T>
implements SplitEnumerator<FlinkSourceSplit<T>, FlinkSourceEnumeratorState<T>> {
private static final Logger LOG = LoggerFactory.getLogger(FlinkSourceSplitEnumerator.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/
package org.apache.beam.runners.flink.translation.wrappers.streaming.io.source;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.io.IOException;
import java.util.ArrayList;
import java.util.LinkedHashMap;
Expand All @@ -35,13 +34,7 @@
import org.slf4j.LoggerFactory;

/** Splits a bounded Beam source and assigns one split for each reader request. */
@SuppressFBWarnings(
value = "CT_CONSTRUCTOR_THROW",
justification =
"Pre-existing finding, not triaged yet."
+ " Making the class final or moving the throwing code"
+ " into a static factory method may fix it.")
public class LazyFlinkSourceSplitEnumerator<T>
public final class LazyFlinkSourceSplitEnumerator<T>
implements SplitEnumerator<FlinkSourceSplit<T>, FlinkSourceEnumeratorState<T>> {
private static final Logger LOG = LoggerFactory.getLogger(LazyFlinkSourceSplitEnumerator.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/
package org.apache.beam.runners.flink.translation.wrappers.streaming.stableinput;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
Expand Down Expand Up @@ -56,13 +55,7 @@
"rawtypes", // TODO(https://github.com/apache/beam/issues/20447)
"nullness" // TODO(https://github.com/apache/beam/issues/20497)
})
@SuppressFBWarnings(
value = "CT_CONSTRUCTOR_THROW",
justification =
"Pre-existing finding, not triaged yet."
+ " Making the class final or moving the throwing code"
+ " into a static factory method may fix it.")
public class BufferingDoFnRunner<InputT, OutputT> implements DoFnRunner<InputT, OutputT> {
public final class BufferingDoFnRunner<InputT, OutputT> implements DoFnRunner<InputT, OutputT> {

public static <InputT, OutputT> BufferingDoFnRunner<InputT, OutputT> create(
DoFnRunner<InputT, OutputT> doFnRunner,
Expand Down
Loading
Loading