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

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


The following commit(s) were added to refs/heads/8.5.x by this push:
     new 6c4944b362 Fix SpotBugs warning. setLastMofified() failure is an error
6c4944b362 is described below

commit 6c4944b362896c18f82092251ec0b47f36efd9ad
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Fri Jun 10 13:36:56 2022 +0100

    Fix SpotBugs warning. setLastMofified() failure is an error
---
 java/org/apache/tomcat/buildutil/RepeatableArchive.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/buildutil/RepeatableArchive.java 
b/java/org/apache/tomcat/buildutil/RepeatableArchive.java
index cff4ea6da5..e17700041e 100644
--- a/java/org/apache/tomcat/buildutil/RepeatableArchive.java
+++ b/java/org/apache/tomcat/buildutil/RepeatableArchive.java
@@ -120,7 +120,9 @@ public class RepeatableArchive extends Task {
                         }
                     }
 
-                    archive.setLastModified(lastModified.toMillis());
+                    if (!archive.setLastModified(lastModified.toMillis())) {
+                        throw new BuildException("setLastModified failed for 
[" + archive.getAbsolutePath() + "]");
+                    }
                     Files.delete(oldArchive.toPath());
                 } catch (IOException ioe) {
                     throw new BuildException(ioe);


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

Reply via email to