Stefan Bodewig | 4aea7b2 | 2011-08-07 07:56:19 +0000 | [diff] [blame] | 1 | <?xml version="1.0"?> |
| 2 | <!-- |
| 3 | Licensed to the Apache Software Foundation (ASF) under one or more |
| 4 | contributor license agreements. See the NOTICE file distributed with |
| 5 | this work for additional information regarding copyright ownership. |
| 6 | The ASF licenses this file to You under the Apache License, Version 2.0 |
| 7 | (the "License"); you may not use this file except in compliance with |
| 8 | the License. You may obtain a copy of the License at |
| 9 | |
| 10 | http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | |
| 12 | Unless required by applicable law or agreed to in writing, software |
| 13 | distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | See the License for the specific language governing permissions and |
| 16 | limitations under the License. |
| 17 | --> |
| 18 | |
| 19 | <!-- |
| 20 | This file contains some false positive bugs detected by findbugs. Their |
| 21 | false positive nature has been analyzed individually and they have been |
| 22 | put here to instruct findbugs it must ignore them. |
| 23 | --> |
| 24 | <FindBugsFilter> |
| 25 | |
| 26 | <!-- Reason: References to System.out/err == --> |
| 27 | <Match> |
| 28 | <Class name="org.apache.commons.compress.archivers.Lister" /> |
| 29 | <Or> |
| 30 | <Method name="main" /> |
| 31 | <Method name="usage" /> |
| 32 | </Or> |
| 33 | <Bug pattern="NP_ALWAYS_NULL" /> |
| 34 | </Match> |
| 35 | <Match> |
| 36 | <Class name="org.apache.commons.compress.archivers.zip.ZipFile" /> |
| 37 | <Method name="finalize" /> |
| 38 | <Bug pattern="NP_ALWAYS_NULL" /> |
| 39 | </Match> |
Stefan Bodewig | 34e9390 | 2011-08-16 04:04:07 +0000 | [diff] [blame] | 40 | <Match> |
| 41 | <Class name="org.apache.commons.compress.archivers.dump.DumpArchiveUtil" /> |
| 42 | <Method name="dumpBlock" /> |
| 43 | <Bug pattern="NP_ALWAYS_NULL" /> |
| 44 | </Match> |
Stefan Bodewig | 4aea7b2 | 2011-08-07 07:56:19 +0000 | [diff] [blame] | 45 | |
| 46 | <!-- Reason: fallthrough is intended --> |
| 47 | <Match> |
| 48 | <Class name="org.apache.commons.compress.archivers.zip.ExtraFieldUtils" /> |
| 49 | <Method name="parse" /> |
| 50 | <Bug pattern="SF_SWITCH_FALLTHROUGH" /> |
| 51 | </Match> |
Stefan Bodewig | cc0039d | 2017-02-04 16:54:01 +0100 | [diff] [blame] | 52 | <Match> |
| 53 | <Class name="org.apache.commons.compress.compressors.lz4.BlockLZ4CompressorInputStream" /> |
| 54 | <Method name="read" /> |
| 55 | <Bug pattern="SF_SWITCH_FALLTHROUGH" /> |
| 56 | </Match> |
Stefan Bodewig | 4aea7b2 | 2011-08-07 07:56:19 +0000 | [diff] [blame] | 57 | |
| 58 | <!-- Reason: fields unused as documented --> |
| 59 | <Match> |
| 60 | <Class name="org.apache.commons.compress.archivers.jar.JarArchiveEntry" /> |
| 61 | <Or> |
| 62 | <Field name="certificates"/> |
| 63 | <Field name="manifestAttributes"/> |
| 64 | </Or> |
| 65 | <Bug pattern="UWF_NULL_FIELD" /> |
| 66 | </Match> |
Stefan Bodewig | 34e9390 | 2011-08-16 04:04:07 +0000 | [diff] [blame] | 67 | <Match> |
| 68 | <Class name="org.apache.commons.compress.archivers.dump.DumpArchiveEntry" /> |
| 69 | <Field name="summary"/> |
| 70 | <Bug pattern="UWF_NULL_FIELD" /> |
| 71 | </Match> |
Stefan Bodewig | a98c124 | 2014-01-01 21:09:17 +0000 | [diff] [blame] | 72 | <Match> |
| 73 | <Class name="org.apache.commons.compress.archivers.sevenz.Folder" /> |
| 74 | <Or> |
| 75 | <Field name="totalInputStreams"/> |
| 76 | </Or> |
| 77 | <Bug pattern="URF_UNREAD_FIELD" /> |
| 78 | </Match> |
Stefan Bodewig | 4aea7b2 | 2011-08-07 07:56:19 +0000 | [diff] [blame] | 79 | |
Stefan Bodewig | 885d205 | 2014-01-01 19:56:59 +0000 | [diff] [blame] | 80 | <!-- Reason: exception in close swallowed in order to re-throw original in caller --> |
Stefan Bodewig | 4aea7b2 | 2011-08-07 07:56:19 +0000 | [diff] [blame] | 81 | <Match> |
Stefan Bodewig | 885d205 | 2014-01-01 19:56:59 +0000 | [diff] [blame] | 82 | <Class name="org.apache.commons.compress.utils.IOUtils" /> |
Stefan Bodewig | 5834b7c | 2014-01-01 21:10:49 +0000 | [diff] [blame] | 83 | <Method name="closeQuietly" /> |
Stefan Bodewig | 2a87945 | 2011-09-15 11:46:02 +0000 | [diff] [blame] | 84 | <Bug pattern="DE_MIGHT_IGNORE" /> |
| 85 | </Match> |
Stefan Bodewig | 4aea7b2 | 2011-08-07 07:56:19 +0000 | [diff] [blame] | 86 | |
Stefan Bodewig | b64aa8a | 2011-08-14 05:39:53 +0000 | [diff] [blame] | 87 | <!-- Reason: skip(Long.MAX_VALUE) called to drain stream completely, |
| 88 | the class overrides skip to ensure it reads the full amount |
| 89 | until EOF is reached --> |
| 90 | <Match> |
| 91 | <Class name="org.apache.commons.compress.archivers.zip.ZipArchiveInputStream" /> |
| 92 | <Method name="closeEntry" /> |
| 93 | <Bug pattern="SR_NOT_CHECKED" /> |
| 94 | </Match> |
Stefan Bodewig | 6106e8d | 2014-01-01 20:23:55 +0000 | [diff] [blame] | 95 | <Match> |
| 96 | <Class name="org.apache.commons.compress.archivers.tar.TarArchiveInputStream" /> |
| 97 | <Method name="getNextTarEntry" /> |
| 98 | <Bug pattern="SR_NOT_CHECKED" /> |
| 99 | </Match> |
Stefan Bodewig | b64aa8a | 2011-08-14 05:39:53 +0000 | [diff] [blame] | 100 | |
Stefan Bodewig | 615cda3 | 2011-09-14 15:13:14 +0000 | [diff] [blame] | 101 | <!-- Reason: trying to delete a temporary file that has deleteOnExit set |
| 102 | anyway --> |
| 103 | <Match> |
| 104 | <Class name="org.apache.commons.compress.compressors.pack200.Pack200Utils" /> |
| 105 | <Method name="normalize" /> |
| 106 | <Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE" /> |
| 107 | </Match> |
| 108 | <Match> |
| 109 | <Class name="org.apache.commons.compress.compressors.pack200.TempFileCachingStreamBridge$1" /> |
| 110 | <Method name="close" /> |
| 111 | <Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE" /> |
| 112 | </Match> |
| 113 | |
| 114 | <!-- Reason: It is the Pack200*Stream that's going to close it. --> |
| 115 | <Match> |
| 116 | <Class name="org.apache.commons.compress.compressors.pack200.TempFileCachingStreamBridge$1" /> |
| 117 | <Method name="<init>" /> |
| 118 | <Bug pattern="OBL_UNSATISFIED_OBLIGATION" /> |
| 119 | </Match> |
| 120 | |
Stefan Bodewig | a98c124 | 2014-01-01 21:09:17 +0000 | [diff] [blame] | 121 | <!-- Reason: the contract is to use default encoding (unless told otherwise) --> |
| 122 | <Match> |
| 123 | <Class name="org.apache.commons.compress.archivers.arj.ArjArchiveInputStream" /> |
| 124 | <Method name="readString" /> |
| 125 | <Bug pattern="DM_DEFAULT_ENCODING" /> |
| 126 | </Match> |
| 127 | <Match> |
| 128 | <Class name="org.apache.commons.compress.archivers.zip.AsiExtraField" /> |
| 129 | <Or> |
| 130 | <Method name="getLocalFileDataData" /> |
| 131 | <Method name="getLocalFileDataLength" /> |
| 132 | <Method name="parseFromLocalFileData" /> |
| 133 | </Or> |
| 134 | <Bug pattern="DM_DEFAULT_ENCODING" /> |
| 135 | </Match> |
| 136 | <Match> |
| 137 | <Class name="org.apache.commons.compress.archivers.zip.FallbackZipEncoding" /> |
| 138 | <Or> |
| 139 | <Method name="decode" /> |
| 140 | <Method name="encode" /> |
| 141 | </Or> |
| 142 | <Bug pattern="DM_DEFAULT_ENCODING" /> |
| 143 | </Match> |
| 144 | |
| 145 | <!-- Reason: default encoding is good enough for exception message --> |
| 146 | <Match> |
| 147 | <Class name="org.apache.commons.compress.archivers.tar.TarUtils" /> |
| 148 | <Method name="exceptionMessage" /> |
| 149 | <Bug pattern="DM_DEFAULT_ENCODING" /> |
| 150 | </Match> |
| 151 | |
| 152 | <!-- Reason: unrolled loop, all possible cases are covered --> |
| 153 | <Match> |
| 154 | <Class name="org.apache.commons.compress.compressors.snappy.PureJavaCrc32C" /> |
| 155 | <Method name="update" /> |
| 156 | <Bug pattern="SF_SWITCH_NO_DEFAULT" /> |
| 157 | </Match> |
| 158 | |
| 159 | <!-- Reason: class only adds unused always-null fields and superclass' equals is sufficient --> |
| 160 | <Match> |
| 161 | <Class name="org.apache.commons.compress.archivers.jar.JarArchiveEntry" /> |
| 162 | <Method name="equals" /> |
| 163 | <Bug pattern="EQ_DOESNT_OVERRIDE_EQUALS" /> |
| 164 | </Match> |
Kristian Rosenvold | 646e03c | 2015-01-10 19:00:31 +0000 | [diff] [blame] | 165 | |
| 166 | <!-- Reason: failure to delete a file that may not exist. And we really don't care that much either --> |
| 167 | <Match> |
Kristian Rosenvold | a7c227c | 2015-01-24 19:26:20 +0000 | [diff] [blame] | 168 | <Class name="org.apache.commons.compress.parallel.FileBasedScatterGatherBackingStore" /> |
Kristian Rosenvold | 646e03c | 2015-01-10 19:00:31 +0000 | [diff] [blame] | 169 | <Method name="close" /> |
| 170 | <Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE" /> |
| 171 | </Match> |
| 172 | |
Stefan Bodewig | 48a0930 | 2016-03-25 16:05:05 +0100 | [diff] [blame] | 173 | <!-- Reason: nested code can throw IllegalArgumentException if |
| 174 | stream is not a TAR stream --> |
| 175 | <Match> |
| 176 | <Class name="org.apache.commons.compress.archivers.ArchiveStreamFactory" /> |
| 177 | <Method name="createArchiveInputStream" /> |
| 178 | <Bug pattern="REC_CATCH_EXCEPTION" /> |
| 179 | </Match> |
| 180 | |
Stefan Bodewig | 3d509a0 | 2016-10-29 17:33:14 +0200 | [diff] [blame] | 181 | <!-- the class wants to allow outside access to the array, just like |
| 182 | ByteBuffer.wrap does --> |
| 183 | <Match> |
| 184 | <Class name="org.apache.commons.compress.utils.SeekableInMemoryByteChannel" /> |
| 185 | <Method name="array" /> |
| 186 | <Bug pattern="EI_EXPOSE_REP" /> |
| 187 | </Match> |
| 188 | <Match> |
| 189 | <Class name="org.apache.commons.compress.utils.SeekableInMemoryByteChannel" /> |
| 190 | <Method name="<init>" /> |
| 191 | <Bug pattern="EI_EXPOSE_REP2" /> |
| 192 | </Match> |
| 193 | |
Stefan Bodewig | a1f969a | 2017-01-10 18:02:40 +0100 | [diff] [blame] | 194 | <!-- the array is exposed deliberately to improve performance and it |
| 195 | is documented that way --> |
| 196 | <Match> |
| 197 | <Class name="org.apache.commons.compress.compressors.lz77support.LZ77Compressor$LiteralBlock" /> |
| 198 | <Method name="getData" /> |
| 199 | <Bug pattern="EI_EXPOSE_REP" /> |
| 200 | </Match> |
Stefan Bodewig | cc0039d | 2017-02-04 16:54:01 +0100 | [diff] [blame] | 201 | <Match> |
| 202 | <Class name="org.apache.commons.compress.compressors.lz77support.LZ77Compressor$LiteralBlock" /> |
| 203 | <Method name="<init>" /> |
| 204 | <Bug pattern="EI_EXPOSE_REP2" /> |
| 205 | </Match> |
Stefan Bodewig | a1f969a | 2017-01-10 18:02:40 +0100 | [diff] [blame] | 206 | |
Stefan Bodewig | 4aea7b2 | 2011-08-07 07:56:19 +0000 | [diff] [blame] | 207 | </FindBugsFilter> |