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:37 UTC
[tomcat] branch 9.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 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new 15d62c19b0 Fix SpotBugs warning. setLastMofified() failure is an error
15d62c19b0 is described below
commit 15d62c19b037e847751b3d44acc8a270dc01df43
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