Skip to content

Commit

Permalink
check against another disklrucache implementation #77
Browse files Browse the repository at this point in the history
https://mvnrepository.com/artifact/
com.github.bumptech.glide/disklrucache/5.0.0-rc01
  • Loading branch information
rsteph-de committed Apr 12, 2024
1 parent bb65a41 commit 098e273
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,6 @@ private static String inputStreamToString(InputStream in) throws IOException {
*
* <p>Analogous to b/71520172.
*/

private static void closeWriter(Writer writer) throws IOException {
writer.close();
}
Expand All @@ -682,7 +681,6 @@ private static void closeWriter(Writer writer) throws IOException {
*
* <p>See b/71520172.
*/

private static void flushWriter(Writer writer) throws IOException {
writer.flush();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import java.io.StringWriter;
import java.nio.charset.Charset;

/** Junk drawer of utility methods. */
final class DiskLruUtil {
static final Charset US_ASCII = Charset.forName("US-ASCII");
static final Charset UTF_8 = Charset.forName("UTF-8");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class StrictLineReader implements Closeable {
* @throws NullPointerException if {@code in} or {@code charset} is null.
* @throws IllegalArgumentException if the specified charset is not supported.
*/
public StrictLineReader(InputStream in, Charset charset) {
StrictLineReader(InputStream in, Charset charset) {
this(in, 8192, charset);
}

Expand All @@ -83,7 +83,7 @@ public StrictLineReader(InputStream in, Charset charset) {
* @throws IllegalArgumentException if {@code capacity} is negative or zero
* or the specified charset is not supported.
*/
public StrictLineReader(InputStream in, int capacity, Charset charset) {
StrictLineReader(InputStream in, int capacity, Charset charset) {
if (in == null || charset == null) {
throw new NullPointerException();
}
Expand All @@ -105,6 +105,7 @@ public StrictLineReader(InputStream in, int capacity, Charset charset) {
*
* @throws IOException for errors when closing the underlying {@code InputStream}.
*/
@Override
public void close() throws IOException {
synchronized (in) {
if (buf != null) {
Expand All @@ -122,7 +123,7 @@ public void close() throws IOException {
* @throws IOException for underlying {@code InputStream} errors.
* @throws EOFException for the end of source stream.
*/
public String readLine() throws IOException {
String readLine() throws IOException {
synchronized (in) {
if (buf == null) {
throw new IOException("LineReader is closed");
Expand Down Expand Up @@ -176,7 +177,7 @@ public String toString() {
}
}

public boolean hasUnterminatedLine() {
boolean hasUnterminatedLine() {
return end == -1;
}

Expand All @@ -193,4 +194,3 @@ private void fillBuf() throws IOException {
end = result;
}
}

0 comments on commit 098e273

Please sign in to comment.