Update webui
This commit is contained in:
parent
2b910edf20
commit
2e14430d3d
8
src/main/java/mdnet/cache/DiskLruCache.java
vendored
8
src/main/java/mdnet/cache/DiskLruCache.java
vendored
|
@ -254,7 +254,9 @@ public final class DiskLruCache implements Closeable {
|
|||
try {
|
||||
readJournalLine(reader.readLine());
|
||||
lineCount++;
|
||||
} catch (EOFException endOfJournal) {
|
||||
} catch(UnexpectedJournalLineException ignored) {
|
||||
// just continue and hope nothing breaks
|
||||
} catch (EOFException e) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -273,7 +275,7 @@ public final class DiskLruCache implements Closeable {
|
|||
private void readJournalLine(String line) throws IOException {
|
||||
int firstSpace = line.indexOf(' ');
|
||||
if (firstSpace == -1) {
|
||||
throw new IOException("unexpected journal line: " + line);
|
||||
throw new UnexpectedJournalLineException(line);
|
||||
}
|
||||
|
||||
int keyBegin = firstSpace + 1;
|
||||
|
@ -305,7 +307,7 @@ public final class DiskLruCache implements Closeable {
|
|||
} else if (secondSpace == -1 && firstSpace == READ.length() && line.startsWith(READ)) {
|
||||
// This work was already done by calling lruEntries.get().
|
||||
} else {
|
||||
throw new IOException("unexpected journal line: " + line);
|
||||
throw new UnexpectedJournalLineException(line);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
9
src/main/java/mdnet/cache/UnexpectedJournalLineException.java
vendored
Normal file
9
src/main/java/mdnet/cache/UnexpectedJournalLineException.java
vendored
Normal 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);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue