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 2022/06/10 12:37:34 UTC
[tomcat] branch 10.0.x updated: Fix SpotBugs warning. setLastMofified() failure is an error
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.0.x by this push:
new b41344277c Fix SpotBugs warning. setLastMofified() failure is an error
b41344277c is described below
commit b41344277cddf3b6ee69223f9c94dc51be1d69a1
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 1348ee64c9..a6442f8138 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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org