You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/07/04 18:17:19 UTC

[commons-imaging] branch master updated: Add missing namespace and XSD to SpotBugs filter file.

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-imaging.git


The following commit(s) were added to refs/heads/master by this push:
     new 29d03b51 Add missing namespace and XSD to SpotBugs filter file.
29d03b51 is described below

commit 29d03b5128f0f03a6a4e9b61c7baf67f1a19b00c
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Jul 4 14:17:14 2022 -0400

    Add missing namespace and XSD to SpotBugs filter file.
---
 src/conf/spotbugs-exclude-filter.xml | 403 ++++++++++++++++++-----------------
 1 file changed, 203 insertions(+), 200 deletions(-)

diff --git a/src/conf/spotbugs-exclude-filter.xml b/src/conf/spotbugs-exclude-filter.xml
index 84abf6ee..a5b779dd 100644
--- a/src/conf/spotbugs-exclude-filter.xml
+++ b/src/conf/spotbugs-exclude-filter.xml
@@ -1,200 +1,203 @@
-<?xml version="1.0"?>
-<!--
-   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.
--->
-
-<!--
-  This file contains some false positive bugs detected by spotbugs. Their
-  false positive nature has been analyzed individually and they have been
-  put here to instruct findbugs it must ignore them.
--->
-<FindBugsFilter>
-  <!-- Reason: Intentionally exposing an array -->
-  <Match>
-    <Class name="org.apache.commons.imaging.common.bytesource.ByteSourceArray" />
-    <Method name="getAll" />
-    <Bug pattern="EI_EXPOSE_REP" />
-  </Match>
-  <Match>
-    <Class name="org.apache.commons.imaging.common.bytesource.ByteSourceArray" />
-    <Bug pattern="EI_EXPOSE_REP2" />
-  </Match>
-  <Match>
-    <Class name="org.apache.commons.imaging.formats.jpeg.iptc.IptcBlock" />
-    <Bug pattern="EI_EXPOSE_REP2" />
-  </Match>
-  <Match>
-    <Class name="org.apache.commons.imaging.formats.jpeg.segments.DqtSegment$QuantizationTable" />
-    <Method name="getElements" />
-    <Bug pattern="EI_EXPOSE_REP" />
-  </Match>
-  <Match>
-    <Class name="org.apache.commons.imaging.formats.jpeg.segments.DqtSegment$QuantizationTable" />
-    <Bug pattern="EI_EXPOSE_REP2" />
-  </Match>
-  <Match>
-    <Class name="org.apache.commons.imaging.formats.tiff.TiffElement$DataElement" />
-    <Bug pattern="EI_EXPOSE_REP2" />
-  </Match>
-  <Match>
-    <Class name="org.apache.commons.imaging.formats.tiff.TiffField" />
-    <Bug pattern="EI_EXPOSE_REP2" />
-  </Match>
-  <Match>
-    <Class name="org.apache.commons.imaging.formats.tiff.TiffImageData$Strips" />
-    <Method name="getImageData" />
-    <Bug pattern="EI_EXPOSE_REP" />
-  </Match>
-  <Match>
-    <Class name="org.apache.commons.imaging.formats.tiff.TiffImageData$Strips" />
-    <Bug pattern="EI_EXPOSE_REP2" />
-  </Match>
-  <Match>
-    <Class name="org.apache.commons.imaging.formats.tiff.TiffRasterData" />
-    <Method name="getData" />
-    <Bug pattern="EI_EXPOSE_REP" />
-  </Match>
-  <Match>
-    <Class name="org.apache.commons.imaging.formats.tiff.TiffRasterData" />
-    <Bug pattern="EI_EXPOSE_REP2" />
-  </Match>
-  <Match>
-    <Class name="org.apache.commons.imaging.formats.tiff.TiffRasterDataFloat" />
-    <Method name="getData" />
-    <Bug pattern="EI_EXPOSE_REP" />
-  </Match>
-  <Match>
-    <Class name="org.apache.commons.imaging.formats.tiff.TiffRasterDataFloat" />
-    <Bug pattern="EI_EXPOSE_REP2" />
-  </Match>
-    <Match>
-    <Class name="org.apache.commons.imaging.formats.tiff.TiffRasterDataInt" />
-    <Method name="getIntData" />
-    <Bug pattern="EI_EXPOSE_REP" />
-  </Match>
-  <Match>
-    <Class name="org.apache.commons.imaging.formats.tiff.TiffRasterDataInt" />
-    <Bug pattern="EI_EXPOSE_REP2" />
-  </Match>
-  <Match>
-    <Class name="org.apache.commons.imaging.formats.tiff.datareaders.ImageDataReader" />
-    <Bug pattern="EI_EXPOSE_REP2" />
-  </Match>
-  <Match>
-    <Class name="org.apache.commons.imaging.formats.tiff.photometricinterpreters.PhotometricInterpreter" />
-    <Bug pattern="EI_EXPOSE_REP2" />
-  </Match>
-  <Match>
-    <Class name="org.apache.commons.imaging.formats.tiff.write.TiffImageWriterLossless" />
-    <Bug pattern="EI_EXPOSE_REP2" />
-  </Match>
-  <Match>
-    <Class name="org.apache.commons.imaging.formats.tiff.write.TiffOutputField" />
-    <Bug pattern="EI_EXPOSE_REP2" />
-  </Match>
-  <Match>
-    <Class name="org.apache.commons.imaging.icc.IccProfileInfo" />
-    <Method name="getTags" />
-    <Bug pattern="EI_EXPOSE_REP" />
-  </Match>
-  <Match>
-    <Class name="org.apache.commons.imaging.icc.IccProfileInfo" />
-    <Bug pattern="EI_EXPOSE_REP2" />
-  </Match>
-  <Match>
-    <Class name="org.apache.commons.imaging.icc.IccTag" />
-    <Method name="setData" />
-    <Bug pattern="EI_EXPOSE_REP2" />
-  </Match>
-  <Match>
-    <Class name="org.apache.commons.imaging.palette.SimplePalette" />
-    <Bug pattern="EI_EXPOSE_REP2" />
-  </Match>
-  <Match>
-    <Class name="org.apache.commons.imaging.formats.tiff.write.TiffOutputDirectory" />
-    <Method name="setNextDirectory" />
-    <Bug pattern="EI_EXPOSE_REP2" />
-  </Match>
-  <Match>
-    <Class name="org.apache.commons.imaging.formats.tiff.TiffImageMetadata$Directory" />
-    <Method name="&lt;init&gt;" />
-    <Bug pattern="EI_EXPOSE_REP2" />
-  </Match>
-  <Match>
-    <Class name="org.apache.commons.imaging.formats.tiff.TiffField" />
-    <Method name="getFieldType" />
-    <Bug pattern="EI_EXPOSE_REP" />
-  </Match>
-  <Match>
-    <Class name="org.apache.commons.imaging.formats.jpeg.decoder.JpegDecoder" />
-    <Method name="decode" />
-    <Bug pattern="EI_EXPOSE_REP" />
-  </Match>
-  <Match>
-    <Class name="org.apache.commons.imaging.formats.jpeg.JpegImageMetadata" />
-    <Method name="getExif" />
-    <Bug pattern="EI_EXPOSE_REP" />
-  </Match>
-  <Match>
-    <Class name="org.apache.commons.imaging.formats.jpeg.JpegImageMetadata" />
-    <Method name="getPhotoshop" />
-    <Bug pattern="EI_EXPOSE_REP" />
-  </Match>
-  <Match>
-    <Class name="org.apache.commons.imaging.formats.jpeg.JpegImageMetadata" />
-    <Method name="&lt;init&gt;" />
-    <Bug pattern="EI_EXPOSE_REP2" />
-  </Match>
-  <Match>
-    <Class name="org.apache.commons.imaging.common.mylzw.MyLzwCompressor" />
-    <Method name="&lt;init&gt;" />
-    <Bug pattern="EI_EXPOSE_REP2" />
-  </Match>
-  <Match>
-    <Class name="org.apache.commons.imaging.common.mylzw.MyBitOutputStream" />
-    <Method name="&lt;init&gt;" />
-    <Bug pattern="EI_EXPOSE_REP2" />
-  </Match>
-  <Match>
-    <Class name="org.apache.commons.imaging.common.mylzw.BitsToByteInputStream" />
-    <Method name="&lt;init&gt;" />
-    <Bug pattern="EI_EXPOSE_REP2" />
-  </Match>
-  <Match>
-    <Class name="org.apache.commons.imaging.common.BinaryOutputStream" />
-    <Method name="&lt;init&gt;" />
-    <Bug pattern="EI_EXPOSE_REP2" />
-  </Match>
-  <Match>
-    <Class name="org.apache.commons.imaging.formats.tiff.TiffImagingParameters" />
-    <Method name="getOutputSet" />
-    <Bug pattern="EI_EXPOSE_REP" />
-  </Match>
-  <Match>
-    <Class name="org.apache.commons.imaging.formats.tiff.TiffImagingParameters" />
-    <Method name="setOutputSet" />
-    <Bug pattern="EI_EXPOSE_REP2" />
-  </Match>
-  <!-- Reason: For code clarity, we could use a simple 'else', but instead keep a complete expression -->
-  <Match>
-    <Class name="org.apache.commons.imaging.formats.pnm.PnmImageParser" />
-    <Bug pattern="UC_USELESS_CONDITION" />
-  </Match>
-  <!-- Reason: false positives with JVM >= 14 - https://github.com/spotbugs/spotbugs/issues/868 -->
-  <Match>
-    <Bug pattern="RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE" />
-  </Match>
-</FindBugsFilter>
+<?xml version="1.0"?>
+<!--
+   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.
+-->
+
+<!--
+  This file contains some false positive bugs detected by spotbugs. Their
+  false positive nature has been analyzed individually and they have been
+  put here to instruct findbugs it must ignore them.
+-->
+<FindBugsFilter
+    xmlns="https://github.com/spotbugs/filter/3.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="https://github.com/spotbugs/filter/3.0.0 https://raw.githubusercontent.com/spotbugs/spotbugs/3.1.0/spotbugs/etc/findbugsfilter.xsd">
+  <!-- Reason: Intentionally exposing an array -->
+  <Match>
+    <Class name="org.apache.commons.imaging.common.bytesource.ByteSourceArray" />
+    <Method name="getAll" />
+    <Bug pattern="EI_EXPOSE_REP" />
+  </Match>
+  <Match>
+    <Class name="org.apache.commons.imaging.common.bytesource.ByteSourceArray" />
+    <Bug pattern="EI_EXPOSE_REP2" />
+  </Match>
+  <Match>
+    <Class name="org.apache.commons.imaging.formats.jpeg.iptc.IptcBlock" />
+    <Bug pattern="EI_EXPOSE_REP2" />
+  </Match>
+  <Match>
+    <Class name="org.apache.commons.imaging.formats.jpeg.segments.DqtSegment$QuantizationTable" />
+    <Method name="getElements" />
+    <Bug pattern="EI_EXPOSE_REP" />
+  </Match>
+  <Match>
+    <Class name="org.apache.commons.imaging.formats.jpeg.segments.DqtSegment$QuantizationTable" />
+    <Bug pattern="EI_EXPOSE_REP2" />
+  </Match>
+  <Match>
+    <Class name="org.apache.commons.imaging.formats.tiff.TiffElement$DataElement" />
+    <Bug pattern="EI_EXPOSE_REP2" />
+  </Match>
+  <Match>
+    <Class name="org.apache.commons.imaging.formats.tiff.TiffField" />
+    <Bug pattern="EI_EXPOSE_REP2" />
+  </Match>
+  <Match>
+    <Class name="org.apache.commons.imaging.formats.tiff.TiffImageData$Strips" />
+    <Method name="getImageData" />
+    <Bug pattern="EI_EXPOSE_REP" />
+  </Match>
+  <Match>
+    <Class name="org.apache.commons.imaging.formats.tiff.TiffImageData$Strips" />
+    <Bug pattern="EI_EXPOSE_REP2" />
+  </Match>
+  <Match>
+    <Class name="org.apache.commons.imaging.formats.tiff.TiffRasterData" />
+    <Method name="getData" />
+    <Bug pattern="EI_EXPOSE_REP" />
+  </Match>
+  <Match>
+    <Class name="org.apache.commons.imaging.formats.tiff.TiffRasterData" />
+    <Bug pattern="EI_EXPOSE_REP2" />
+  </Match>
+  <Match>
+    <Class name="org.apache.commons.imaging.formats.tiff.TiffRasterDataFloat" />
+    <Method name="getData" />
+    <Bug pattern="EI_EXPOSE_REP" />
+  </Match>
+  <Match>
+    <Class name="org.apache.commons.imaging.formats.tiff.TiffRasterDataFloat" />
+    <Bug pattern="EI_EXPOSE_REP2" />
+  </Match>
+    <Match>
+    <Class name="org.apache.commons.imaging.formats.tiff.TiffRasterDataInt" />
+    <Method name="getIntData" />
+    <Bug pattern="EI_EXPOSE_REP" />
+  </Match>
+  <Match>
+    <Class name="org.apache.commons.imaging.formats.tiff.TiffRasterDataInt" />
+    <Bug pattern="EI_EXPOSE_REP2" />
+  </Match>
+  <Match>
+    <Class name="org.apache.commons.imaging.formats.tiff.datareaders.ImageDataReader" />
+    <Bug pattern="EI_EXPOSE_REP2" />
+  </Match>
+  <Match>
+    <Class name="org.apache.commons.imaging.formats.tiff.photometricinterpreters.PhotometricInterpreter" />
+    <Bug pattern="EI_EXPOSE_REP2" />
+  </Match>
+  <Match>
+    <Class name="org.apache.commons.imaging.formats.tiff.write.TiffImageWriterLossless" />
+    <Bug pattern="EI_EXPOSE_REP2" />
+  </Match>
+  <Match>
+    <Class name="org.apache.commons.imaging.formats.tiff.write.TiffOutputField" />
+    <Bug pattern="EI_EXPOSE_REP2" />
+  </Match>
+  <Match>
+    <Class name="org.apache.commons.imaging.icc.IccProfileInfo" />
+    <Method name="getTags" />
+    <Bug pattern="EI_EXPOSE_REP" />
+  </Match>
+  <Match>
+    <Class name="org.apache.commons.imaging.icc.IccProfileInfo" />
+    <Bug pattern="EI_EXPOSE_REP2" />
+  </Match>
+  <Match>
+    <Class name="org.apache.commons.imaging.icc.IccTag" />
+    <Method name="setData" />
+    <Bug pattern="EI_EXPOSE_REP2" />
+  </Match>
+  <Match>
+    <Class name="org.apache.commons.imaging.palette.SimplePalette" />
+    <Bug pattern="EI_EXPOSE_REP2" />
+  </Match>
+  <Match>
+    <Class name="org.apache.commons.imaging.formats.tiff.write.TiffOutputDirectory" />
+    <Method name="setNextDirectory" />
+    <Bug pattern="EI_EXPOSE_REP2" />
+  </Match>
+  <Match>
+    <Class name="org.apache.commons.imaging.formats.tiff.TiffImageMetadata$Directory" />
+    <Method name="&lt;init&gt;" />
+    <Bug pattern="EI_EXPOSE_REP2" />
+  </Match>
+  <Match>
+    <Class name="org.apache.commons.imaging.formats.tiff.TiffField" />
+    <Method name="getFieldType" />
+    <Bug pattern="EI_EXPOSE_REP" />
+  </Match>
+  <Match>
+    <Class name="org.apache.commons.imaging.formats.jpeg.decoder.JpegDecoder" />
+    <Method name="decode" />
+    <Bug pattern="EI_EXPOSE_REP" />
+  </Match>
+  <Match>
+    <Class name="org.apache.commons.imaging.formats.jpeg.JpegImageMetadata" />
+    <Method name="getExif" />
+    <Bug pattern="EI_EXPOSE_REP" />
+  </Match>
+  <Match>
+    <Class name="org.apache.commons.imaging.formats.jpeg.JpegImageMetadata" />
+    <Method name="getPhotoshop" />
+    <Bug pattern="EI_EXPOSE_REP" />
+  </Match>
+  <Match>
+    <Class name="org.apache.commons.imaging.formats.jpeg.JpegImageMetadata" />
+    <Method name="&lt;init&gt;" />
+    <Bug pattern="EI_EXPOSE_REP2" />
+  </Match>
+  <Match>
+    <Class name="org.apache.commons.imaging.common.mylzw.MyLzwCompressor" />
+    <Method name="&lt;init&gt;" />
+    <Bug pattern="EI_EXPOSE_REP2" />
+  </Match>
+  <Match>
+    <Class name="org.apache.commons.imaging.common.mylzw.MyBitOutputStream" />
+    <Method name="&lt;init&gt;" />
+    <Bug pattern="EI_EXPOSE_REP2" />
+  </Match>
+  <Match>
+    <Class name="org.apache.commons.imaging.common.mylzw.BitsToByteInputStream" />
+    <Method name="&lt;init&gt;" />
+    <Bug pattern="EI_EXPOSE_REP2" />
+  </Match>
+  <Match>
+    <Class name="org.apache.commons.imaging.common.BinaryOutputStream" />
+    <Method name="&lt;init&gt;" />
+    <Bug pattern="EI_EXPOSE_REP2" />
+  </Match>
+  <Match>
+    <Class name="org.apache.commons.imaging.formats.tiff.TiffImagingParameters" />
+    <Method name="getOutputSet" />
+    <Bug pattern="EI_EXPOSE_REP" />
+  </Match>
+  <Match>
+    <Class name="org.apache.commons.imaging.formats.tiff.TiffImagingParameters" />
+    <Method name="setOutputSet" />
+    <Bug pattern="EI_EXPOSE_REP2" />
+  </Match>
+  <!-- Reason: For code clarity, we could use a simple 'else', but instead keep a complete expression -->
+  <Match>
+    <Class name="org.apache.commons.imaging.formats.pnm.PnmImageParser" />
+    <Bug pattern="UC_USELESS_CONDITION" />
+  </Match>
+  <!-- Reason: false positives with JVM >= 14 - https://github.com/spotbugs/spotbugs/issues/868 -->
+  <Match>
+    <Bug pattern="RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE" />
+  </Match>
+</FindBugsFilter>