Skip to content

Commit

Permalink
Merge branch 'release/4.1' into release/5.0
Browse files Browse the repository at this point in the history
# Conflicts:
#	CHANGES.md
#	pom.xml
#	src/main/java/edu/illinois/library/cantaloupe/cache/FilesystemCache.java
  • Loading branch information
Alex Dolski committed Dec 15, 2021
2 parents 4e7eb3e + 0aafd86 commit 096ffed
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
7 changes: 7 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

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

## 5.0.4

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

## 4.1.11

* Fixed an issue with the 4.1.10 build whereby the logback-classic dependency
had been updated to version 1.2.8 but not logback-core.

## 4.1.10

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

## 4.1.9

Expand Down
5 changes: 3 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<jackson.version>2.11.0</jackson.version>
<jetty.version>9.4.34.v20201102</jetty.version>
<jruby.version>9.2.17.0</jruby.version>
<logback.version>1.2.8</logback.version>
<surefire.version>3.0.0-M3</surefire.version>
</properties>

Expand Down Expand Up @@ -58,12 +59,12 @@
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.3</version>
<version>${logback.version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.2.3</version>
<version>${logback.version}</version>
</dependency>
<!-- Allow the use of Logstash encoders with logback -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import edu.illinois.library.cantaloupe.util.DeletingFileVisitor;
import edu.illinois.library.cantaloupe.util.StringUtils;
import org.apache.commons.codec.binary.Hex;
import org.apache.commons.lang3.SystemUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

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

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

/**
* Sets the age threshold for cleaning files. Cleanable files last
* modified less than this many milliseconds ago will not be subject to
* accessed less than this many milliseconds ago will not be subject to
* cleanup.
*
* @param age Age in milliseconds.
Expand Down

0 comments on commit 096ffed

Please sign in to comment.