From: markt Date: Sun, 16 Jan 2011 21:06:31 +0000 (+0000) Subject: Fix FindBugs warnings X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=ce90e4167b4bf887518daaccfce9a56badab674a;p=tomcat7.0 Fix FindBugs warnings git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1059671 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/tomcat/util/net/AprEndpoint.java b/java/org/apache/tomcat/util/net/AprEndpoint.java index 610a93ae4..dcb912eec 100644 --- a/java/org/apache/tomcat/util/net/AprEndpoint.java +++ b/java/org/apache/tomcat/util/net/AprEndpoint.java @@ -1435,7 +1435,7 @@ public class AprEndpoint extends AbstractEndpoint { if (rv == Status.APR_SUCCESS) { sendfileCount--; } - sendfileData.remove(new Long(data.socket)); + sendfileData.remove(Long.valueOf(data.socket)); } /** @@ -1488,7 +1488,7 @@ public class AprEndpoint extends AbstractEndpoint { SendfileData data = addS.get(i); int rv = Poll.add(sendfilePollset, data.socket, Poll.APR_POLLOUT); if (rv == Status.APR_SUCCESS) { - sendfileData.put(new Long(data.socket), data); + sendfileData.put(Long.valueOf(data.socket), data); successCount++; } else { log.warn(sm.getString("endpoint.sendfile.addfail", "" + rv, Error.strerror(rv))); @@ -1511,7 +1511,7 @@ public class AprEndpoint extends AbstractEndpoint { for (int n = 0; n < rv; n++) { // Get the sendfile state SendfileData state = - sendfileData.get(new Long(desc[n*2+1])); + sendfileData.get(Long.valueOf(desc[n*2+1])); // Problem events if (((desc[n*2] & Poll.APR_POLLHUP) == Poll.APR_POLLHUP) || ((desc[n*2] & Poll.APR_POLLERR) == Poll.APR_POLLERR)) { @@ -1575,7 +1575,7 @@ public class AprEndpoint extends AbstractEndpoint { if (rv > 0) { for (int n = 0; n < rv; n++) { // Get the sendfile state - SendfileData state = sendfileData.get(new Long(desc[n])); + SendfileData state = sendfileData.get(Long.valueOf(desc[n])); // Close socket and clear pool remove(state); // Destroy file descriptor pool, which should close the file diff --git a/res/findbugs/filter-false-positives.xml b/res/findbugs/filter-false-positives.xml index b69278a1b..1ab467c60 100644 --- a/res/findbugs/filter-false-positives.xml +++ b/res/findbugs/filter-false-positives.xml @@ -99,6 +99,30 @@ + + + + + + + + + + + + + + + + + + + + + + + +