Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/FileSender.java')
-rw-r--r--org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/FileSender.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/FileSender.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/FileSender.java
index 05510a05b0..946fb15a3d 100644
--- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/FileSender.java
+++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/FileSender.java
@@ -58,12 +58,14 @@ import java.io.IOException;
import java.io.OutputStream;
import java.io.RandomAccessFile;
import java.text.MessageFormat;
+import java.time.Instant;
import java.util.Enumeration;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.util.FS;
/**
* Dumps a file over HTTP GET (or its information via HEAD).
@@ -76,7 +78,7 @@ final class FileSender {
private final RandomAccessFile source;
- private final long lastModified;
+ private final Instant lastModified;
private final long fileLen;
@@ -89,7 +91,7 @@ final class FileSender {
this.source = new RandomAccessFile(path, "r");
try {
- this.lastModified = path.lastModified();
+ this.lastModified = FS.DETECTED.lastModifiedInstant(path);
this.fileLen = source.getChannel().size();
this.end = fileLen;
} catch (IOException e) {
@@ -114,7 +116,7 @@ final class FileSender {
}
}
- long getLastModified() {
+ Instant getLastModified() {
return lastModified;
}

Back to the top