Author: sgoeschl
Date: Tue Feb 17 23:31:09 2009
New Revision: 745296

URL: http://svn.apache.org/viewvc?rev=745296&view=rev
Log:
[EXEC-35] Fixing minor findbugs issues.

Added:
    commons/proper/exec/trunk/findbugs-exclude-filter.xml
Modified:
    commons/proper/exec/trunk/pom.xml
    commons/proper/exec/trunk/src/changes/changes.xml
    
commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/environment/OpenVmsProcessingEnvironment.java

Added: commons/proper/exec/trunk/findbugs-exclude-filter.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/exec/trunk/findbugs-exclude-filter.xml?rev=745296&view=auto
==============================================================================
--- commons/proper/exec/trunk/findbugs-exclude-filter.xml (added)
+++ commons/proper/exec/trunk/findbugs-exclude-filter.xml Tue Feb 17 23:31:09 
2009
@@ -0,0 +1,33 @@
+<?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>
+
+  <!-- The following cases are intentional hard-coded paths for different 
operating systems -->
+  <Match>
+    <Class 
name="org.apache.commons.exec.environment.DefaultProcessingEnvironment" />
+    <Method name="getProcEnvCommand" params="" 
returns="org.apache.commons.exec.CommandLine" />
+    <Bug pattern="DMI_HARDCODED_ABSOLUTE_FILENAME" />
+  </Match>
+
+</FindBugsFilter>

Modified: commons/proper/exec/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/exec/trunk/pom.xml?rev=745296&r1=745295&r2=745296&view=diff
==============================================================================
--- commons/proper/exec/trunk/pom.xml (original)
+++ commons/proper/exec/trunk/pom.xml Tue Feb 17 23:31:09 2009
@@ -128,6 +128,16 @@
           </reportSet>
         </reportSets>
       </plugin>           
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>findbugs-maven-plugin</artifactId>
+        <version>1.2</version>
+        <configuration>
+          <threshold>Normal</threshold>
+          <effort>Default</effort>
+          
<excludeFilterFile>${basedir}/findbugs-exclude-filter.xml</excludeFilterFile>
+       </configuration>
+      </plugin>
     </plugins>
   </reporting>
 

Modified: commons/proper/exec/trunk/src/changes/changes.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/exec/trunk/src/changes/changes.xml?rev=745296&r1=745295&r2=745296&view=diff
==============================================================================
--- commons/proper/exec/trunk/src/changes/changes.xml (original)
+++ commons/proper/exec/trunk/src/changes/changes.xml Tue Feb 17 23:31:09 2009
@@ -24,6 +24,9 @@
   </properties>
   <body>
     <release version="1.0.0" date="As in SVN" description="Sandbox release">
+      <action dev="sgoeschl" type="fix" due-to="Luc Maisonobe" issue="EXEC-35">
+        Fixing a few findbugs issues.
+      </action>
       <action dev="sgoeschl" type="fix" due-to="Marco Ferrante" 
issue="EXEC-32">
         Handle null streams consistently.
       </action>

Modified: 
commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/environment/OpenVmsProcessingEnvironment.java
URL: 
http://svn.apache.org/viewvc/commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/environment/OpenVmsProcessingEnvironment.java?rev=745296&r1=745295&r2=745296&view=diff
==============================================================================
--- 
commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/environment/OpenVmsProcessingEnvironment.java
 (original)
+++ 
commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/environment/OpenVmsProcessingEnvironment.java
 Tue Feb 17 23:31:09 2009
@@ -109,8 +109,8 @@
             logicals.put(logName, logValue);
         }
 
-        for (Iterator i = logicals.keySet().iterator(); i.hasNext();) {
-            String logical = (String) i.next();
+        for (Iterator i = logicals.entrySet().iterator(); i.hasNext();) {
+            String logical = (String) ((Map.Entry) i.next()).getKey();
             environment.put(logical, logicals.get(logical));
         }
         return environment;


Reply via email to