From 541f433a46c106d9e22c6057797258856ed8b705 Mon Sep 17 00:00:00 2001 From: Niki Roo Date: Sat, 25 Apr 2020 21:12:10 +0200 Subject: [PATCH] sync --- library/BasicLibrary.java | 7 ++++--- library/CacheLibrary.java | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/library/BasicLibrary.java b/library/BasicLibrary.java index 586c4ef1..a754c002 100644 --- a/library/BasicLibrary.java +++ b/library/BasicLibrary.java @@ -348,14 +348,14 @@ abstract public class BasicLibrary { /** * Check if the {@link Story} denoted by this Library UID is present in the - * cache (if we have no cache, we default to true). + * cache (if we have no cache, we default to true). * * @param luid * the Library UID * * @return TRUE if it is */ - public boolean isCached(String luid) { + public boolean isCached(@SuppressWarnings("unused") String luid) { // By default, everything is cached return true; } @@ -372,6 +372,7 @@ abstract public class BasicLibrary { * @throws IOException * in case of I/O error */ + @SuppressWarnings("unused") public void clearFromCache(String luid) throws IOException { // By default, this is a noop. } @@ -637,7 +638,7 @@ abstract public class BasicLibrary { * @throws IOException * in case of IOException */ - public synchronized Story getStory(String luid, Progress pg) + public Story getStory(String luid, Progress pg) throws IOException { Progress pgMetas = new Progress(); Progress pgStory = new Progress(); diff --git a/library/CacheLibrary.java b/library/CacheLibrary.java index 23f19a9e..92e4ae7a 100644 --- a/library/CacheLibrary.java +++ b/library/CacheLibrary.java @@ -326,7 +326,7 @@ public class CacheLibrary extends BasicLibrary { } @Override - public void delete(String luid) throws IOException { + public synchronized void delete(String luid) throws IOException { if (isCached(luid)) { cacheLib.delete(luid); } -- 2.27.0