Permalink
Browse files

[EXEC-35] Fixing minor findbugs issues.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/exec/trunk@745296 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent ac669bb commit 515ef2c8a3b02312563018d04549e70ac5aa9a68 Siegfried Goeschl committed Feb 17, 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>
View
10 pom.xml
@@ -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>
View
@@ -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>
@@ -109,8 +109,8 @@ private Map addVMSLogicals(final Map environment,
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;

0 comments on commit 515ef2c

Please sign in to comment.