Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,6 @@
<artifactId>joda-time</artifactId>
<version>2.12.7</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>32.0.1-jre</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/loci/common/Location.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,12 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.regex.Pattern;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.google.common.collect.MapMaker;

/**
* Pseudo-extension of {@link java.io.File} that supports reading over HTTP
* (among other things).
Expand Down Expand Up @@ -92,7 +91,7 @@ protected class ListingsResult {
}
}
private static final Map<String, ListingsResult> fileListings =
new MapMaker().makeMap(); // like Java's ConcurrentHashMap
new ConcurrentHashMap<String, ListingsResult>();

/** Pattern to match child URLs */
private static final Pattern URL_MATCHER = Pattern.compile(
Expand Down
5 changes: 1 addition & 4 deletions src/main/java/loci/common/RandomAccessOutputStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
import java.nio.ByteBuffer;
import java.nio.ByteOrder;

import com.google.common.math.LongMath;

/**
* RandomAccessOutputStream provides methods for writing to files and
* byte arrays.
Expand Down Expand Up @@ -123,8 +121,7 @@ public void skipBytes(int skip) throws IOException {
final long currentPosition = outputFile.getFilePointer();
final long newPosition;
try {
/* in Java 8 can instead use addExact */
newPosition = LongMath.checkedAdd(currentPosition, skip);
newPosition = Math.addExact(currentPosition, skip);
} catch (ArithmeticException ae) {
/* translate to expected checked exception */
throw new IOException("seek is out of range", ae);
Expand Down