You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2024/06/28 20:35:25 UTC
(commons-compress) 02/08: Upgrade commons-io from 2.15.1 to 2.16.1 #513
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git
commit 7ed339dde7b4b2113a8c6aa25722d311f837c7ed
Author: Mike Drob <md...@apache.org>
AuthorDate: Fri Jun 28 16:30:40 2024 -0400
Upgrade commons-io from 2.15.1 to 2.16.1 #513
- Migrate to non-deprecated code
- Thanks to madrob Mike Drob and PR 513
- https://github.com/apache/commons-compress/pull/513/files
---
.../commons/compress/archivers/zip/X5455_ExtendedTimestamp.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/X5455_ExtendedTimestamp.java b/src/main/java/org/apache/commons/compress/archivers/zip/X5455_ExtendedTimestamp.java
index 4c1a4448e..82c9db8a2 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/X5455_ExtendedTimestamp.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/X5455_ExtendedTimestamp.java
@@ -26,6 +26,7 @@ import java.util.Objects;
import java.util.zip.ZipException;
import org.apache.commons.compress.utils.TimeUtils;
+import org.apache.commons.io.file.attribute.FileTimes;
/**
* <p>
@@ -121,13 +122,13 @@ public class X5455_ExtendedTimestamp implements ZipExtraField, Cloneable, Serial
}
private static FileTime unixTimeToFileTime(final ZipLong unixTime) {
- return unixTime != null ? TimeUtils.unixTimeToFileTime(unixTime.getIntValue()) : null;
+ return unixTime != null ? FileTimes.fromUnixTime(unixTime.getIntValue()) : null;
}
// The 3 boolean fields (below) come from this flag's byte. The remaining 5 bits
// are ignored according to the current version of the spec (December 2012).
private static ZipLong unixTimeToZipLong(final long unixTime) {
- if (!TimeUtils.isUnixTime(unixTime)) {
+ if (!FileTimes.isUnixTime(unixTime)) {
throw new IllegalArgumentException("X5455 timestamps must fit in a signed 32 bit integer: " + unixTime);
}
return new ZipLong(unixTime);