Skip to content
Merged
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,6 +21,7 @@
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 @@ -53,6 +54,12 @@
"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 {

/* Logger for class.*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/
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 @@ -88,6 +89,12 @@ 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 {

private String binaryName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/
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 @@ -26,6 +27,12 @@
@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 {

String fileName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/
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 @@ -44,6 +45,12 @@
*
* <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 {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
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 @@ -77,6 +78,12 @@
*
* <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 {

private static final Logger LOG = LoggerFactory.getLogger(BigtableResourceManager.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
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 @@ -60,6 +61,12 @@
* <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>
implements ResourceManager {

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

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
Expand Down Expand Up @@ -59,6 +60,12 @@
"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 StatefulDoFnRunner<InputT, OutputT, W extends BoundedWindow>
implements DoFnRunner<InputT, OutputT> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

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 @@ -32,6 +33,12 @@
* 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 {
private static final ObjectMapper MAPPER =
new ObjectMapper()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,12 @@
"nullness" // TODO(https://github.com/apache/beam/issues/20497)
})
@SuppressFBWarnings(
value = "IS2_INCONSISTENT_SYNC",
justification = "Some access on purpose are left unsynchronized")
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 {

private static final int DEFAULT_BOUND = 100; // Default maximum size of the trie
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import static org.apache.beam.sdk.util.Preconditions.checkArgumentNotNull;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -53,6 +54,12 @@
@SuppressWarnings({
"rawtypes" // TODO(https://github.com/apache/beam/issues/20447)
})
@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.")
class ParDoEvaluator<InputT> implements TransformEvaluator<InputT> {

public interface DoFnRunnerFactory<InputT, OutputT> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1500,7 +1500,7 @@ public BundleFinalizer bundleFinalizer() {
}
}

class FlinkTimerInternals implements TimerInternals {
final class FlinkTimerInternals implements TimerInternals {

private static final String PENDING_TIMERS_STATE_NAME = "pending-timers";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
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 @@ -130,6 +131,12 @@
"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
implements FlinkPortablePipelineTranslator<
FlinkStreamingPortablePipelineTranslator.StreamingTranslationContext> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1529,7 +1529,7 @@ public BundleFinalizer bundleFinalizer() {
}
}

class FlinkTimerInternals implements TimerInternals {
final class FlinkTimerInternals implements TimerInternals {

private static final String PENDING_TIMERS_STATE_NAME = "pending-timers";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/
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,6 +68,12 @@
"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>
extends RichParallelSourceFunction<WindowedValue<ValueWithRecordId<OutputT>>>
implements BeamStoppableFunction,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/
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 @@ -103,6 +104,12 @@
"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 {

private static final StateNamespace globalWindowNamespace =
Expand Down Expand Up @@ -1185,7 +1192,7 @@ public int hashCode() {
}
}

private class FlinkWatermarkHoldState implements WatermarkHoldState {
private final class FlinkWatermarkHoldState implements WatermarkHoldState {

private final TimestampCombiner timestampCombiner;
private final String namespaceString;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1529,7 +1529,7 @@ public BundleFinalizer bundleFinalizer() {
}
}

class FlinkTimerInternals implements TimerInternals {
final class FlinkTimerInternals implements TimerInternals {

private static final String PENDING_TIMERS_STATE_NAME = "pending-timers";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
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 @@ -130,6 +131,12 @@
"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
implements FlinkPortablePipelineTranslator<
FlinkStreamingPortablePipelineTranslator.StreamingTranslationContext> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

/** {@link org.apache.beam.sdk.transforms.windowing.WindowFn.AssignContext} for Flink functions. */
@SuppressWarnings({"keyfor", "nullness"}) // TODO(https://github.com/apache/beam/issues/20497)
class FlinkAssignContext<InputT, W extends BoundedWindow>
final class FlinkAssignContext<InputT, W extends BoundedWindow>
extends WindowFn<InputT, W>.AssignContext {
private final WindowedValue<InputT> value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1503,7 +1503,7 @@ public BundleFinalizer bundleFinalizer() {
}
}

class FlinkTimerInternals implements TimerInternals {
final class FlinkTimerInternals implements TimerInternals {

private static final String PENDING_TIMERS_STATE_NAME = "pending-timers";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* operation is keyed and pushed-back data needs to stay in the correct partition when they get
* moved.
*/
class KeyedPushedBackElementsHandler<K, T> implements PushedBackElementsHandler<T> {
final class KeyedPushedBackElementsHandler<K, T> implements PushedBackElementsHandler<T> {

static <K, T> KeyedPushedBackElementsHandler<K, T> create(
KeySelector<T, K> keySelector,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/
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 @@ -66,6 +67,12 @@
"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>
extends RichParallelSourceFunction<WindowedValue<ValueWithRecordId<OutputT>>>
implements BeamStoppableFunction,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/
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 @@ -39,6 +40,12 @@
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>
implements SplitEnumerator<FlinkSourceSplit<T>, FlinkSourceEnumeratorState<T>> {
private static final Logger LOG = LoggerFactory.getLogger(FlinkSourceSplitEnumerator.class);
Expand Down
Loading
Loading