Update webui

This commit is contained in:
carbotaniuman 2020-08-03 09:55:57 -05:00
parent 2b910edf20
commit 2e14430d3d
2 changed files with 14 additions and 3 deletions

View file

@ -254,7 +254,9 @@ public final class DiskLruCache implements Closeable {
try { try {
readJournalLine(reader.readLine()); readJournalLine(reader.readLine());
lineCount++; lineCount++;
} catch (EOFException endOfJournal) { } catch(UnexpectedJournalLineException ignored) {
// just continue and hope nothing breaks
} catch (EOFException e) {
break; break;
} }
} }
@ -273,7 +275,7 @@ public final class DiskLruCache implements Closeable {
private void readJournalLine(String line) throws IOException { private void readJournalLine(String line) throws IOException {
int firstSpace = line.indexOf(' '); int firstSpace = line.indexOf(' ');
if (firstSpace == -1) { if (firstSpace == -1) {
throw new IOException("unexpected journal line: " + line); throw new UnexpectedJournalLineException(line);
} }
int keyBegin = firstSpace + 1; int keyBegin = firstSpace + 1;
@ -305,7 +307,7 @@ public final class DiskLruCache implements Closeable {
} else if (secondSpace == -1 && firstSpace == READ.length() && line.startsWith(READ)) { } else if (secondSpace == -1 && firstSpace == READ.length() && line.startsWith(READ)) {
// This work was already done by calling lruEntries.get(). // This work was already done by calling lruEntries.get().
} else { } else {
throw new IOException("unexpected journal line: " + line); throw new UnexpectedJournalLineException(line);
} }
} }

View file

@ -0,0 +1,9 @@
package mdnet.cache;
import java.io.IOException;
public class UnexpectedJournalLineException extends IOException {
public UnexpectedJournalLineException(String unexpectedLine) {
super("unexpected journal line: " + unexpectedLine);
}
}