You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2019/05/03 17:43:51 UTC

[tomcat] branch master updated (cda676c -> 151b447)

This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


    from cda676c  Reduce diff to Commons Pool 2 to reduce future maintenance
     new 5c026aa  Fix SpotBugs false positive
     new 151b447  Fix SpotBugs warning

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 java/org/apache/tomcat/util/http/fileupload/disk/DiskFileItem.java | 5 ++++-
 res/findbugs/filter-false-positives.xml                            | 7 +++++++
 2 files changed, 11 insertions(+), 1 deletion(-)


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[tomcat] 02/02: Fix SpotBugs warning

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 151b4472f3b2ea7a7ea820dee6d4c617d3864a2a
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Fri May 3 18:41:30 2019 +0100

    Fix SpotBugs warning
---
 java/org/apache/tomcat/util/http/fileupload/disk/DiskFileItem.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/util/http/fileupload/disk/DiskFileItem.java b/java/org/apache/tomcat/util/http/fileupload/disk/DiskFileItem.java
index 38c783e..3992162 100644
--- a/java/org/apache/tomcat/util/http/fileupload/disk/DiskFileItem.java
+++ b/java/org/apache/tomcat/util/http/fileupload/disk/DiskFileItem.java
@@ -392,7 +392,10 @@ public class DiskFileItem
                  * desired file.
                  */
                 if (file.exists()) {
-                    file.delete();
+                    if (!file.delete()) {
+                        throw new FileUploadException(
+                                "Cannot write uploaded file to disk!");
+                    }
                 }
                 if (!outputFile.renameTo(file)) {
                     BufferedInputStream in = null;


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[tomcat] 01/02: Fix SpotBugs false positive

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 5c026aad80ed73b32e9aa230429c948d0928e9a4
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Fri May 3 18:40:28 2019 +0100

    Fix SpotBugs false positive
---
 res/findbugs/filter-false-positives.xml | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/res/findbugs/filter-false-positives.xml b/res/findbugs/filter-false-positives.xml
index 30ee367..c7239f2 100644
--- a/res/findbugs/filter-false-positives.xml
+++ b/res/findbugs/filter-false-positives.xml
@@ -961,6 +961,13 @@
     <Bug code="Dm" />
   </Match>
   <Match>
+    <!-- As per the comment, FileSystems.getDefault() does have a
+         side-effect. -->
+    <Class name="org.apache.juli.logging.LogFactory"/>
+    <Method name="&lt;init&gt;"/>
+    <Bug pattern="RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT" />
+  </Match>
+  <Match>
     <!-- Reference.equals() implementation correctly handles sub-classes -->
     <Class name="org.apache.naming.ServiceRef" />
     <Pattern code="EQ_DOESNT_OVERRIDE_EQUALS" />


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org