| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <FindBugsFilter> |
| <!-- Ignored bug categories. Bugs in these categories should not block the build. --> |
| <Bug category="I18N"/> |
| <Bug pattern="DM_STRING_CTOR"/> |
| <Bug pattern="EI_EXPOSE_REP" /> |
| <Bug pattern="EI_EXPOSE_REP2" /> |
| <Bug pattern="SE_NO_SERIALVERSIONID"/> |
| |
| <!-- The uncallable method error fails on @ProcessElement style methods --> |
| <Bug pattern="UMAC_UNCALLABLE_METHOD_OF_ANONYMOUS_CLASS"/> |
| |
| <!-- Suppress checking of AutoValue internals --> |
| <Match> |
| <Class name="~.*AutoValue_.*"/> |
| </Match> |
| |
| <!-- |
| Suppressed findbugs issues. All new issues should include a comment why they're |
| suppressed. |
| |
| Suppressions should go in this file rather than inline using @SuppressFBWarnings to avoid |
| unapproved artifact license. |
| --> |
| <Match> |
| <Class name="org.apache.beam.sdk.coders.AvroCoder$SerializableSchemaSupplier"/> |
| <Field name="schema"/> |
| <Bug pattern="SE_BAD_FIELD"/> |
| <!-- |
| writeReplace makes this object serializable. This is a limitation of FindBugs as discussed here: |
| http://stackoverflow.com/questions/26156523/is-writeobject-not-neccesary-using-the-serialization-proxy-pattern |
| --> |
| </Match> |
| |
| <Match> |
| <Class name="org.apache.beam.sdk.coders.SerializableCoder"/> |
| <Field name="typeDescriptor"/> |
| <Bug pattern="SE_TRANSIENT_FIELD_NOT_RESTORED"/> |
| <!-- |
| the field is used only in getEncodedTypeDescriptor, where it is restored if it is not present due to |
| serialization |
| --> |
| </Match> |
| |
| <Match> |
| <Class name="org.apache.beam.sdk.io.jms.JmsRecord"/> |
| <Field name="jmsDestination"/> |
| <Bug pattern="SE_BAD_FIELD"/> |
| <!-- |
| JMS destination is serializable according to the JMS spec even if it doesn't implement |
| Serializable. |
| --> |
| </Match> |
| <Match> |
| <Class name="org.apache.beam.sdk.io.jms.JmsRecord"/> |
| <Field name="jmsReplyTo"/> |
| <Bug pattern="SE_BAD_FIELD"/> |
| <!-- |
| JMS ReplyTo destination is serializable according to the JMS spec even if it doesn't implement |
| Serializable. |
| --> |
| </Match> |
| |
| <Match> |
| <Class name="org.apache.beam.sdk.coders.InstantCoder$LexicographicLongConverter"/> |
| <Bug pattern="HE_INHERITS_EQUALS_USE_HASHCODE"/> |
| <!-- Converter overrides .equals() to add documentation but does not change behavior --> |
| </Match> |
| |
| <Match> |
| <Class name="org.apache.beam.sdk.testing.PAssert$PCollectionViewAssert"/> |
| <Method name="equals" /> |
| <Bug pattern="EQ_UNUSUAL"/> |
| <!-- Unsupported operation --> |
| </Match> |
| |
| <Match> |
| <Class name="org.apache.beam.sdk.testing.PAssert$PCollectionContentsAssert"/> |
| <Method name="equals" /> |
| <Bug pattern="EQ_UNUSUAL"/> |
| <!-- Unsupported operation --> |
| </Match> |
| |
| <Match> |
| <Class name="org.apache.beam.sdk.testing.SerializableMatchers$SerializableArrayViaCoder"/> |
| <Field name="value" /> |
| <Bug pattern="SE_TRANSIENT_FIELD_NOT_RESTORED"/> |
| <!-- Cached value is lazily restored on read. --> |
| </Match> |
| |
| <Match> |
| <Class name="org.apache.beam.sdk.transforms.Mean$CountSum"/> |
| <Method name="equals" /> |
| <Bug pattern="FE_FLOATING_POINT_EQUALITY"/> |
| <!-- Comparing doubles directly since equals method is only used in coder test. --> |
| </Match> |
| |
| <Match> |
| <Class name="org.apache.beam.sdk.util.ExposedByteArrayInputStream"/> |
| <Method name="readAll" /> |
| <Bug pattern="EI_EXPOSE_REP"/> |
| <!-- Returns internal buffer by design. --> |
| </Match> |
| |
| <Match> |
| <Class name="org.apache.beam.sdk.util.ExposedByteArrayOutputStream"/> |
| <Method name="toByteArray" /> |
| <Bug pattern="EI_EXPOSE_REP"/> |
| <!-- Returns internal buffer by design. --> |
| </Match> |
| |
| <Match> |
| <Class name="org.apache.beam.sdk.util.ExposedByteArrayOutputStream"/> |
| <Method name="toByteArray" /> |
| <Bug pattern="EI_EXPOSE_REP"/> |
| <!-- Returns internal buffer by design. --> |
| </Match> |
| |
| <Match> |
| <Class name="org.apache.beam.sdk.util.ExposedByteArrayOutputStream"/> |
| <Method name="writeAndOwn" /> |
| <Bug pattern="EI_EXPOSE_REP"/> |
| <!-- Takes ownership of input buffer --> |
| </Match> |
| |
| <Match> |
| <Class name="org.apache.beam.runners.dataflow.util.MonitoringUtilTest" /> |
| <Field name="thrown" /> |
| <Bug pattern="URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD" /> |
| <!-- TestRule used automatically by JUnit framework --> |
| </Match> |
| <Match> |
| <Class name="org.apache.beam.runners.dataflow.util.OutputReference" /> |
| <Field name="type" /> |
| <Bug pattern="SS_SHOULD_BE_STATIC" /> |
| <!-- Field read via reflection --> |
| </Match> |
| |
| <Match> |
| <Class name="org.apache.beam.runners.dataflow.options.DataflowPipelineOptionsTest" /> |
| <Field name="restoreSystemProperties" /> |
| <Bug pattern="URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD" /> |
| <!-- TestRule used automatically by JUnit framework --> |
| </Match> |
| |
| <Match> |
| <Class name="org.apache.beam.runners.dataflow.TestDataflowRunner" /> |
| <Method name="waitForStreamingJobTermination" /> |
| <Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE" /> |
| <!-- waitForStreamingJobTermination checks status via job.waitUntilFinish() --> |
| </Match> |
| |
| <Match> |
| <Class name="org.apache.beam.runners.direct.ExecutorServiceParallelExecutor$QueueMessageReceiver" /> |
| <Or> |
| <Method name="failed" /> |
| <Method name="cancelled" /> |
| <Method name="completed" /> |
| </Or> |
| <Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE" /> |
| <!-- updates is a non-capacity-limited LinkedBlockingQueue, which |
| can never refuse an offered update --> |
| </Match> |
| |
| <Match> |
| <Class name="org.apache.beam.runners.spark.util.BroadcastHelper$CodedBroadcastHelper"/> |
| <Or> |
| <Field name="bcast" /> |
| <Field name="value" /> |
| </Or> |
| <Bug pattern="IS2_INCONSISTENT_SYNC"/> |
| <!-- |
| Spark's Broadcast variables are a distributed and cached objects |
| and should not be treated as "normal" objects. |
| --> |
| </Match> |
| |
| <Match> |
| <Class name="org.apache.beam.runners.spark.util.BroadcastHelper$DirectBroadcastHelper"/> |
| <Or> |
| <Field name="bcast" /> |
| <Field name="value" /> |
| </Or> |
| <Bug pattern="IS2_INCONSISTENT_SYNC"/> |
| <!-- |
| Spark's Broadcast variables are a distributed and cached objects |
| and should not be treated as "normal" objects. |
| --> |
| </Match> |
| |
| <Match> |
| <Class name="org.apache.beam.runners.spark.metrics.sink.CsvSink"/> |
| <Bug pattern="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS"/> |
| <!-- Intentionally overriding parent name because inheritors should replace the parent. --> |
| </Match> |
| |
| <Match> |
| <Class name="org.apache.beam.runners.spark.metrics.sink.GraphiteSink"/> |
| <Bug pattern="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS"/> |
| <!-- Intentionally overriding parent name because inheritors should replace the parent. --> |
| </Match> |
| |
| <Match> |
| <Class name="org.apache.beam.sdk.io.LocalResourceId"/> |
| <Method name="getCurrentDirectory" /> |
| <Bug pattern="NP_NULL_PARAM_DEREF"/> |
| <!-- |
| Path.getParent() could return null. However, we check the returned Path is not null. |
| --> |
| </Match> |
| |
| <Match> |
| <Class name="org.apache.beam.sdk.extensions.gcp.storage.GcsResourceId"/> |
| <Method name="getCurrentDirectory" /> |
| <Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"/> |
| <!-- |
| GcsPath.getParent() could return null. However, we check the returned Path is not null. |
| --> |
| </Match> |
| |
| <Match> |
| <Class name="org.apache.beam.sdk.util.ZipFiles"/> |
| <Method name="zipDirectory" /> |
| <Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"/> |
| <!-- |
| File.listFiles() will return null if the File instance is not a directory. Null dereference is |
| not a possibility here since we validate sourceDirectory is directory via |
| sourceDirectory.isDirectory() |
| --> |
| </Match> |
| |
| <Match> |
| <Class name="org.apache.beam.sdk.util.ZipFiles"/> |
| <Method name="zipDirectoryInternal" /> |
| <Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"/> |
| <!-- |
| File.listFiles() will return null if the File instance is not a directory. Null dereference is |
| not a possibility here since we validate sourceDirectory is directory via |
| sourceDirectory.isDirectory() |
| --> |
| </Match> |
| |
| <Match> |
| <Class name="org.apache.beam.runners.core.StateMerging"/> |
| <Method name="prefetchRead" /> |
| <Bug pattern="RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT"/> |
| <!-- prefetch call readLater --> |
| </Match> |
| |
| <Match> |
| <Class name="org.apache.beam.runner.core.PaneInfoTracker"/> |
| <Method name="getNextPaneInfo" /> |
| <Bug pattern="RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT"/> |
| <!-- prefetch side effect --> |
| </Match> |
| |
| <Match> |
| <Class name="org.apache.beam.runner.core.SystemReduceFn"/> |
| <Method name="prefetchOnTrigger" /> |
| <Bug pattern="RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT"/> |
| <!-- prefetch side effect --> |
| </Match> |
| |
| <Match> |
| <Class name="org.apache.beam.runner.core.WatermarkHold"/> |
| <Method name="extractAndRelease" /> |
| <Bug pattern="RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT"/> |
| <!-- prefetch call readLater --> |
| </Match> |
| |
| <Match> |
| <Class name="org.apache.beam.runners.core.triggers.AfterDelayFromFirstElementStateMachine"/> |
| <Method name="prefetchOnElement" /> |
| <Bug pattern="RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT"/> |
| <!-- prefetch side effect --> |
| </Match> |
| |
| <Match> |
| <Class name="org.apache.beam.runners.core.triggers.AfterDelayFromFirstElementStateMachine"/> |
| <Method name="prefetchShouldFire" /> |
| <Bug pattern="RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT"/> |
| <!-- prefetch side effect --> |
| </Match> |
| |
| <Match> |
| <Class name="org.apache.beam.runners.core.triggers.AfterPaneStateMachine"/> |
| <Method name="prefetchShouldFire" /> |
| <Bug pattern="RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT"/> |
| <!-- prefetch side effect --> |
| </Match> |
| |
| <Match> |
| <Class name="org.apache.beam.runners.core.triggers.TriggerStateMachines$StateMachineConverter"/> |
| <Method name="evaluateSpecific" /> |
| <Bug pattern="UPM_UNCALLED_PRIVATE_METHOD"/> |
| <!-- Called via reflection --> |
| </Match> |
| |
| <!-- |
| Baseline issues. No new issues should be added below this line and all existing issues should |
| have an associated JIRA |
| --> |
| |
| <Match> |
| <Class name="org.apache.beam.sdk.coders.JAXBCoder"/> |
| <Method name="getContext"/> |
| <Bug pattern="DC_DOUBLECHECK"/> |
| <!--[BEAM-398] Possible double check of field--> |
| </Match> |
| <Match> |
| <Class name="org.apache.beam.sdk.testing.WindowSupplier"/> |
| <Field name="windows"/> |
| <Bug pattern="IS2_INCONSISTENT_SYNC"/> |
| <!--[BEAM-407] Inconsistent synchronization --> |
| </Match> |
| <Match> |
| <Class name="org.apache.beam.sdk.util.CombineFnUtil$NonSerializableBoundedCombineFn"/> |
| <Field name="context"/> |
| <Bug pattern="SE_BAD_FIELD"/> |
| <!-- |
| The class is not meant to be serializable, writeObject() just throws an exception. Therefore |
| it's reasonable for this field to also not be serializable. |
| --> |
| </Match> |
| <Match> |
| <Class name="org.apache.beam.runners.core.WatermarkHold"/> |
| <Field name="timerInternals"/> |
| <Bug pattern="SE_BAD_FIELD"/> |
| <!--[BEAM-420] Non-transient non-serializable instance field in serializable class--> |
| </Match> |
| <Match> |
| <Class name="StateSpecs$CombiningStateSpec"/> |
| <Method name="equals"/> |
| <Bug pattern="EQ_DOESNT_OVERRIDE_EQUALS"/> |
| <!--[BEAM-421] Class doesn't override equals in superclass--> |
| </Match> |
| <Match> |
| <Class name="org.apache.beam.sdk.util.ClassPath$ClassInfo"/> |
| <Method name="equals"/> |
| <Bug pattern="EQ_DOESNT_OVERRIDE_EQUALS"/> |
| <!--[BEAM-1676] Class doesn't override equals in superclass--> |
| </Match> |
| <Match> |
| <Class name="org.apache.beam.sdk.util.AutoValue_GcsUtil_StorageObjectOrIOException"/> |
| <Bug pattern="NM_CLASS_NOT_EXCEPTION"/> |
| <!-- It is clear from the name that this class holds either StorageObject or IOException. --> |
| </Match> |
| |
| <Match> |
| <Class name="org.apache.beam.sdk.extensions.gcp.util.GcsUtil$StorageObjectOrIOException"/> |
| <Bug pattern="NM_CLASS_NOT_EXCEPTION"/> |
| <!-- It is clear from the name that this class holds either StorageObject or IOException. --> |
| </Match> |
| |
| <Match> |
| <Class name="org.apache.beam.runners.direct.ParDoMultiOverrideFactory$StatefulParDo"/> |
| <Bug pattern="SE_TRANSIENT_FIELD_NOT_RESTORED"/> |
| <!-- PTransforms do not actually support serialization. --> |
| </Match> |
| |
| <Match> |
| <Class name="org.apache.beam.sdk.options.ProxyInvocationHandler"/> |
| <Field name="~.*"/> |
| <Bug pattern="SE_BAD_FIELD"/> |
| <!-- |
| ProxyInvocationHandler implements Serializable only for the sake of throwing an informative |
| exception in writeObject() |
| --> |
| </Match> |
| |
| <Match> |
| <!-- |
| Classes in this package is auto-generated, let's disable the findbugs for it. |
| --> |
| <Package name="org.apache.beam.sdk.extensions.sql.impl.parser.impl"/> |
| </Match> |
| |
| <Match> |
| <!-- |
| Classes in this package is auto-generated, let's disable the findbugs for it. |
| --> |
| <Package name="org.apache.beam.sdk.schemas.parser.generated"/> |
| </Match> |
| |
| <Match> |
| <!-- |
| Classes in this package is auto-generated, let's disable the findbugs for it. |
| --> |
| <Package name="org.apache.beam.sdk.io.clickhouse.impl.parser"/> |
| </Match> |
| |
| <Match> |
| <Class name="org.apache.beam.runners.fnexecution.control.DockerJobBundleFactory$SimpleStageBundleFactory"/> |
| <Field name="wrappedClient"/> |
| <Bug pattern="URF_UNREAD_FIELD"/> |
| <!-- Fix build. --> |
| </Match> |
| |
| <Match> |
| <!-- |
| This is a false positive. Spotbugs does not recognize the use of try-with-resources, so it thinks that |
| the connection is not correctly closed. |
| --> |
| <Or> |
| <And> |
| <Class name="org.apache.beam.sdk.io.jdbc.JdbcIO$ReadFn"/> |
| <Method name="processElement"/> |
| </And> |
| <And> |
| <Class name="org.apache.beam.sdk.io.jdbc.JdbcIO$ReadRows"/> |
| <Method name="inferBeamSchema"/> |
| </And> |
| </Or> |
| |
| <Bug pattern="OBL_UNSATISFIED_OBLIGATION"/> |
| </Match> |
| </FindBugsFilter> |