blob: 5cc6c5ea7ccb9f56986434744cbbde7ffd359a0f [file] [log] [blame]
Stefan Bodewig4aea7b22011-08-07 07:56:19 +00001<?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 Bodewig34e93902011-08-16 04:04:07 +000040 <Match>
41 <Class name="org.apache.commons.compress.archivers.dump.DumpArchiveUtil" />
42 <Method name="dumpBlock" />
43 <Bug pattern="NP_ALWAYS_NULL" />
44 </Match>
Stefan Bodewig4aea7b22011-08-07 07:56:19 +000045
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>
52
53 <!-- Reason: fields unused as documented -->
54 <Match>
55 <Class name="org.apache.commons.compress.archivers.jar.JarArchiveEntry" />
56 <Or>
57 <Field name="certificates"/>
58 <Field name="manifestAttributes"/>
59 </Or>
60 <Bug pattern="UWF_NULL_FIELD" />
61 </Match>
Stefan Bodewig34e93902011-08-16 04:04:07 +000062 <Match>
63 <Class name="org.apache.commons.compress.archivers.dump.DumpArchiveEntry" />
64 <Field name="summary"/>
65 <Bug pattern="UWF_NULL_FIELD" />
66 </Match>
Stefan Bodewiga98c1242014-01-01 21:09:17 +000067 <Match>
68 <Class name="org.apache.commons.compress.archivers.sevenz.Folder" />
69 <Or>
70 <Field name="totalInputStreams"/>
71 </Or>
72 <Bug pattern="URF_UNREAD_FIELD" />
73 </Match>
Stefan Bodewig4aea7b22011-08-07 07:56:19 +000074
Stefan Bodewig885d2052014-01-01 19:56:59 +000075 <!-- Reason: exception in close swallowed in order to re-throw original in caller -->
Stefan Bodewig4aea7b22011-08-07 07:56:19 +000076 <Match>
Stefan Bodewig885d2052014-01-01 19:56:59 +000077 <Class name="org.apache.commons.compress.utils.IOUtils" />
Stefan Bodewig5834b7c2014-01-01 21:10:49 +000078 <Method name="closeQuietly" />
Stefan Bodewig2a879452011-09-15 11:46:02 +000079 <Bug pattern="DE_MIGHT_IGNORE" />
80 </Match>
Stefan Bodewig4aea7b22011-08-07 07:56:19 +000081
Stefan Bodewigb64aa8a2011-08-14 05:39:53 +000082 <!-- Reason: skip(Long.MAX_VALUE) called to drain stream completely,
83 the class overrides skip to ensure it reads the full amount
84 until EOF is reached -->
85 <Match>
86 <Class name="org.apache.commons.compress.archivers.zip.ZipArchiveInputStream" />
87 <Method name="closeEntry" />
88 <Bug pattern="SR_NOT_CHECKED" />
89 </Match>
Stefan Bodewig6106e8d2014-01-01 20:23:55 +000090 <Match>
91 <Class name="org.apache.commons.compress.archivers.tar.TarArchiveInputStream" />
92 <Method name="getNextTarEntry" />
93 <Bug pattern="SR_NOT_CHECKED" />
94 </Match>
Stefan Bodewigb64aa8a2011-08-14 05:39:53 +000095
Stefan Bodewig615cda32011-09-14 15:13:14 +000096 <!-- Reason: trying to delete a temporary file that has deleteOnExit set
97 anyway -->
98 <Match>
99 <Class name="org.apache.commons.compress.compressors.pack200.Pack200Utils" />
100 <Method name="normalize" />
101 <Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE" />
102 </Match>
103 <Match>
104 <Class name="org.apache.commons.compress.compressors.pack200.TempFileCachingStreamBridge$1" />
105 <Method name="close" />
106 <Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE" />
107 </Match>
108
109 <!-- Reason: It is the Pack200*Stream that's going to close it. -->
110 <Match>
111 <Class name="org.apache.commons.compress.compressors.pack200.TempFileCachingStreamBridge$1" />
112 <Method name="&lt;init&gt;" />
113 <Bug pattern="OBL_UNSATISFIED_OBLIGATION" />
114 </Match>
115
Stefan Bodewiga98c1242014-01-01 21:09:17 +0000116 <!-- Reason: the contract is to use default encoding (unless told otherwise) -->
117 <Match>
118 <Class name="org.apache.commons.compress.archivers.arj.ArjArchiveInputStream" />
119 <Method name="readString" />
120 <Bug pattern="DM_DEFAULT_ENCODING" />
121 </Match>
122 <Match>
123 <Class name="org.apache.commons.compress.archivers.zip.AsiExtraField" />
124 <Or>
125 <Method name="getLocalFileDataData" />
126 <Method name="getLocalFileDataLength" />
127 <Method name="parseFromLocalFileData" />
128 </Or>
129 <Bug pattern="DM_DEFAULT_ENCODING" />
130 </Match>
131 <Match>
132 <Class name="org.apache.commons.compress.archivers.zip.FallbackZipEncoding" />
133 <Or>
134 <Method name="decode" />
135 <Method name="encode" />
136 </Or>
137 <Bug pattern="DM_DEFAULT_ENCODING" />
138 </Match>
139
140 <!-- Reason: default encoding is good enough for exception message -->
141 <Match>
142 <Class name="org.apache.commons.compress.archivers.tar.TarUtils" />
143 <Method name="exceptionMessage" />
144 <Bug pattern="DM_DEFAULT_ENCODING" />
145 </Match>
146
147 <!-- Reason: unrolled loop, all possible cases are covered -->
148 <Match>
149 <Class name="org.apache.commons.compress.compressors.snappy.PureJavaCrc32C" />
150 <Method name="update" />
151 <Bug pattern="SF_SWITCH_NO_DEFAULT" />
152 </Match>
153
154 <!-- Reason: class only adds unused always-null fields and superclass' equals is sufficient -->
155 <Match>
156 <Class name="org.apache.commons.compress.archivers.jar.JarArchiveEntry" />
157 <Method name="equals" />
158 <Bug pattern="EQ_DOESNT_OVERRIDE_EQUALS" />
159 </Match>
Kristian Rosenvold646e03c2015-01-10 19:00:31 +0000160
161 <!-- Reason: failure to delete a file that may not exist. And we really don't care that much either -->
162 <Match>
Kristian Rosenvolda7c227c2015-01-24 19:26:20 +0000163 <Class name="org.apache.commons.compress.parallel.FileBasedScatterGatherBackingStore" />
Kristian Rosenvold646e03c2015-01-10 19:00:31 +0000164 <Method name="close" />
165 <Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE" />
166 </Match>
167
Stefan Bodewig48a09302016-03-25 16:05:05 +0100168 <!-- Reason: nested code can throw IllegalArgumentException if
169 stream is not a TAR stream -->
170 <Match>
171 <Class name="org.apache.commons.compress.archivers.ArchiveStreamFactory" />
172 <Method name="createArchiveInputStream" />
173 <Bug pattern="REC_CATCH_EXCEPTION" />
174 </Match>
175
Stefan Bodewig4aea7b22011-08-07 07:56:19 +0000176</FindBugsFilter>