commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nia...@apache.org
Subject svn commit: r1032164 - in /commons/proper/io/trunk: findbugs-exclude-filter.xml pom.xml src/assembly/src.xml
Date Sat, 06 Nov 2010 21:53:29 GMT
Author: niallp
Date: Sat Nov  6 21:53:29 2010
New Revision: 1032164

URL: http://svn.apache.org/viewvc?rev=1032164&view=rev
Log:
Add FindBugs excludes filter

Added:
    commons/proper/io/trunk/findbugs-exclude-filter.xml   (with props)
Modified:
    commons/proper/io/trunk/pom.xml
    commons/proper/io/trunk/src/assembly/src.xml

Added: commons/proper/io/trunk/findbugs-exclude-filter.xml
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/findbugs-exclude-filter.xml?rev=1032164&view=auto
==============================================================================
--- commons/proper/io/trunk/findbugs-exclude-filter.xml (added)
+++ commons/proper/io/trunk/findbugs-exclude-filter.xml Sat Nov  6 21:53:29 2010
@@ -0,0 +1,88 @@
+<?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 findbugs. Their
+  false positive nature has been analyzed individually and they have been
+  put here to instruct findbugs it must ignore them.
+-->
+<FindBugsFilter>
+
+
+  <!--  See discussion on https://issues.apache.org/jira/browse/IO-215 -->
+  <Match>
+    <Class name="org.apache.commons.io.FileUtils" />
+    <Or>
+      <Method name="doCopyDirectory" params="java.io.File,java.io.File,java.io.FileFilter,boolean,java.util.List"
returns="void" />
+      <Method name="doCopyFile" params="java.io.File,java.io.File,boolean" returns="void"
/>
+    </Or>
+    <Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE" />
+  </Match>
+
+
+  <!--
+       Ignoring the return from mkdirs() is a false positives since the
+       following line in both those methods checks for the existence of
+       the directory and throws an exception if it doesn't exist. 
+    -->
+  <Match>
+    <Class name="org.apache.commons.io.FileUtils" />
+    <Or>
+      <Method name="moveDirectoryToDirectory" params="java.io.File,java.io.File,boolean"
returns="void" />
+      <Method name="moveFileToDirectory" params="java.io.File,java.io.File,boolean" returns="void"
/>
+    </Or>
+    <Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE" />
+  </Match>
+
+
+  <!--
+      FileEntry is used internally by FileAlterationObserver to refresh and
+      update the state of files it is monitoring and in that context this is
+      not an issue. If people re-use it elsewhere then they need to
+      take care - but its not its primary purpose here and so its OK
+    -->
+  <Match>
+    <Class name="org.apache.commons.io.monitor.FileEntry" />
+    <Method name="setChildren" params="org.apache.commons.io.monitor.FileEntry[]" returns="void"
/>
+    <Bug pattern="EI_EXPOSE_REP2" />
+  </Match>
+
+
+  <!--  See discussion on https://issues.apache.org/jira/browse/IO-214 -->
+  <Match>
+    <Class name="org.apache.commons.io.output.ByteArrayOutputStream" />
+    <Bug pattern="IS2_INCONSISTENT_SYNC" />
+  </Match>
+
+
+  <!-- This is a false positive since close() does nothing in the Stream implementation
being used -->
+  <Match>
+    <Class name="org.apache.commons.io.output.ByteArrayOutputStream" />
+    <Method name="toBufferedInputStream" params="java.io.InputStream" returns="java.io.InputStream"
/>
+    <Bug pattern="OS_OPEN_STREAM" />
+  </Match>
+
+
+  <!--  See discussion on https://issues.apache.org/jira/browse/IO-216 -->
+  <Match>
+    <Class name="org.apache.commons.io.output.LockableFileWriter" />
+    <Method name="close" params="" returns="void" />
+    <Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE" />
+  </Match>
+
+</FindBugsFilter>

Propchange: commons/proper/io/trunk/findbugs-exclude-filter.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/io/trunk/findbugs-exclude-filter.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: commons/proper/io/trunk/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/pom.xml?rev=1032164&r1=1032163&r2=1032164&view=diff
==============================================================================
--- commons/proper/io/trunk/pom.xml (original)
+++ commons/proper/io/trunk/pom.xml Sat Nov  6 21:53:29 2010
@@ -282,13 +282,11 @@
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>findbugs-maven-plugin</artifactId>
         <version>2.3.1</version>
-        <!-- 
         <configuration>
           <threshold>Normal</threshold>
           <effort>Default</effort>
           <excludeFilterFile>${basedir}/findbugs-exclude-filter.xml</excludeFilterFile>
         </configuration>
-        -->
       </plugin>
     </plugins>    
   </reporting>

Modified: commons/proper/io/trunk/src/assembly/src.xml
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/assembly/src.xml?rev=1032164&r1=1032163&r2=1032164&view=diff
==============================================================================
--- commons/proper/io/trunk/src/assembly/src.xml (original)
+++ commons/proper/io/trunk/src/assembly/src.xml Sat Nov  6 21:53:29 2010
@@ -26,6 +26,7 @@
             <includes>
                 <include>build.xml</include>
                 <include>checkstyle.xml</include>
+                <include>findbugs-exclude-filter.xml</include>
                 <include>LICENSE.txt</include>
                 <include>NOTICE.txt</include>
                 <include>pom.xml</include>



Mime
View raw message