Skip to content

Commit 096ffed

Browse files
author
Alex Dolski
committed
Merge branch 'release/4.1' into release/5.0
# Conflicts: # CHANGES.md # pom.xml # src/main/java/edu/illinois/library/cantaloupe/cache/FilesystemCache.java
2 parents 4e7eb3e + 0aafd86 commit 096ffed

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

CHANGES.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
* Fixed an uncaught exception when returning HTTP 401 status from the
66
`pre_authorize()` or `authorize()` delegate methods.
7+
* Updated the Logback dependency to version 1.2.8.
78

89
## 5.0.4
910

@@ -159,12 +160,18 @@
159160
* The `-Dcantaloupe.list_fonts` VM argument has been replaced with the
160161
`-list-fonts` command-line argument.
161162

163+
## 4.1.11
164+
165+
* Fixed an issue with the 4.1.10 build whereby the logback-classic dependency
166+
had been updated to version 1.2.8 but not logback-core.
167+
162168
## 4.1.10
163169

164170
* Fixed the IIIF Image API v2 image endpoint not sending a `Link` header in
165171
response to requests for cached images.
166172
* Suppressed an error-level log message from OpenJpegProcessor when reading
167173
an image without a recognized filename extension on a read-only filesystem.
174+
* Updated the Logback dependency to version 1.2.8.
168175

169176
## 4.1.9
170177

pom.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<jackson.version>2.11.0</jackson.version>
2020
<jetty.version>9.4.34.v20201102</jetty.version>
2121
<jruby.version>9.2.17.0</jruby.version>
22+
<logback.version>1.2.8</logback.version>
2223
<surefire.version>3.0.0-M3</surefire.version>
2324
</properties>
2425

@@ -58,12 +59,12 @@
5859
<dependency>
5960
<groupId>ch.qos.logback</groupId>
6061
<artifactId>logback-classic</artifactId>
61-
<version>1.2.3</version>
62+
<version>${logback.version}</version>
6263
</dependency>
6364
<dependency>
6465
<groupId>ch.qos.logback</groupId>
6566
<artifactId>logback-core</artifactId>
66-
<version>1.2.3</version>
67+
<version>${logback.version}</version>
6768
</dependency>
6869
<!-- Allow the use of Logstash encoders with logback -->
6970
<dependency>

src/main/java/edu/illinois/library/cantaloupe/cache/FilesystemCache.java

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import edu.illinois.library.cantaloupe.util.DeletingFileVisitor;
1010
import edu.illinois.library.cantaloupe.util.StringUtils;
1111
import org.apache.commons.codec.binary.Hex;
12-
import org.apache.commons.lang3.SystemUtils;
1312
import org.slf4j.Logger;
1413
import org.slf4j.LoggerFactory;
1514

@@ -288,9 +287,9 @@ public void write(byte[] b, int off, int len) throws IOException {
288287
new ConcurrentHashMap<>();
289288

290289
/**
291-
* Returns the last-accessed time of the given file. On some OS/filesystem
292-
* combinations, this may be unreliable or not available, in which case the
293-
* last-modified time is returned instead.
290+
* Returns the last-accessed time of the given file. On some filesystems,
291+
* particularly those mounted with a {@code noatime} option, this may be
292+
* the same as the last-modified time.
294293
*
295294
* @param file File to check.
296295
* @return Last-accessed time of the given file, if available, or the
@@ -300,12 +299,6 @@ public void write(byte[] b, int off, int len) throws IOException {
300299
*/
301300
static FileTime getLastAccessedTime(Path file) throws IOException {
302301
try {
303-
// Last-accessed time is not reliable on macOS+APFS 10.13.2.
304-
if (SystemUtils.IS_OS_MAC) {
305-
LOGGER.trace("macOS detected; using file last-modified " +
306-
"instead of last-accessed times.");
307-
return Files.getLastModifiedTime(file);
308-
}
309302
return (FileTime) Files.getAttribute(file, "lastAccessTime");
310303
} catch (UnsupportedOperationException e) {
311304
LOGGER.error("getLastAccessedTime(): {}", e.getMessage(), e);
@@ -974,7 +967,7 @@ public void put(Identifier identifier, String info) throws IOException {
974967

975968
/**
976969
* Sets the age threshold for cleaning files. Cleanable files last
977-
* modified less than this many milliseconds ago will not be subject to
970+
* accessed less than this many milliseconds ago will not be subject to
978971
* cleanup.
979972
*
980973
* @param age Age in milliseconds.

0 commit comments

Comments
 (0)