From bf21aae7910eca3474f2a8ea817ab214b9d7e768 Mon Sep 17 00:00:00 2001 From: Rsl1122 Date: Wed, 16 Aug 2017 10:44:03 +0300 Subject: [PATCH] removed IllegalStateException or IllegalArgumentException throws from method signatures --- Plan/src/main/java/com/djrapitops/plan/api/API.java | 2 +- .../java/com/djrapitops/plan/data/cache/DataCacheHandler.java | 2 +- .../src/main/java/com/djrapitops/plan/data/time/TimeKeeper.java | 2 +- .../com/djrapitops/plan/data/cache/DataCacheHandlerTest.java | 2 +- .../plan/data/cache/queue/DataCacheClearQueueTest.java | 2 +- .../plan/data/cache/queue/DataCacheProcessQueueTest.java | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Plan/src/main/java/com/djrapitops/plan/api/API.java b/Plan/src/main/java/com/djrapitops/plan/api/API.java index 195e9948f..4401833dd 100644 --- a/Plan/src/main/java/com/djrapitops/plan/api/API.java +++ b/Plan/src/main/java/com/djrapitops/plan/api/API.java @@ -237,7 +237,7 @@ public class API { * @throws IllegalStateException If the player has not played on the server * before. */ - public String getPlayerName(UUID uuid) throws IllegalStateException, IllegalArgumentException { + public String getPlayerName(UUID uuid) { Verify.nullCheck(uuid); IOfflinePlayer offlinePlayer = Fetch.getIOfflinePlayer(uuid); if (Verify.notNull(offlinePlayer)) { diff --git a/Plan/src/main/java/com/djrapitops/plan/data/cache/DataCacheHandler.java b/Plan/src/main/java/com/djrapitops/plan/data/cache/DataCacheHandler.java index 32ef1d5ad..ca684cd30 100644 --- a/Plan/src/main/java/com/djrapitops/plan/data/cache/DataCacheHandler.java +++ b/Plan/src/main/java/com/djrapitops/plan/data/cache/DataCacheHandler.java @@ -122,7 +122,7 @@ public class DataCacheHandler extends SessionCache { * parameters. * @throws IllegalStateException BukkitScheduler is in a wrong state. */ - public void startAsyncPeriodicSaveTask() throws IllegalArgumentException, IllegalStateException { + public void startAsyncPeriodicSaveTask() { int minutes = Settings.SAVE_CACHE_MIN.getNumber(); if (minutes <= 0) { minutes = 5; diff --git a/Plan/src/main/java/com/djrapitops/plan/data/time/TimeKeeper.java b/Plan/src/main/java/com/djrapitops/plan/data/time/TimeKeeper.java index 50c312a04..44d4cd5d6 100644 --- a/Plan/src/main/java/com/djrapitops/plan/data/time/TimeKeeper.java +++ b/Plan/src/main/java/com/djrapitops/plan/data/time/TimeKeeper.java @@ -68,7 +68,7 @@ public abstract class TimeKeeper { * @throws IllegalArgumentException If new state is null. * @throws IllegalStateException If lastStateChange time is higher than playtime. */ - public void changeState(String newState, long playTime) throws IllegalArgumentException, IllegalStateException { + public void changeState(String newState, long playTime) { Verify.nullCheck(newState); // if (playTime < lastStateChange) { // throw new IllegalStateException("Given Playtime is lower than last status change time: " + playTime + " / " + lastStateChange); diff --git a/Plan/test/test/java/main/java/com/djrapitops/plan/data/cache/DataCacheHandlerTest.java b/Plan/test/test/java/main/java/com/djrapitops/plan/data/cache/DataCacheHandlerTest.java index d50ed8847..61352ee3f 100644 --- a/Plan/test/test/java/main/java/com/djrapitops/plan/data/cache/DataCacheHandlerTest.java +++ b/Plan/test/test/java/main/java/com/djrapitops/plan/data/cache/DataCacheHandlerTest.java @@ -110,7 +110,7 @@ public class DataCacheHandlerTest { when(plan.getDB()).thenReturn(db); handler = new DataCacheHandler(plan) { @Override - public void startAsyncPeriodicSaveTask() throws IllegalArgumentException, IllegalStateException { + public void startAsyncPeriodicSaveTask() { } }; } diff --git a/Plan/test/test/java/main/java/com/djrapitops/plan/data/cache/queue/DataCacheClearQueueTest.java b/Plan/test/test/java/main/java/com/djrapitops/plan/data/cache/queue/DataCacheClearQueueTest.java index 18081eba9..7342e7d33 100644 --- a/Plan/test/test/java/main/java/com/djrapitops/plan/data/cache/queue/DataCacheClearQueueTest.java +++ b/Plan/test/test/java/main/java/com/djrapitops/plan/data/cache/queue/DataCacheClearQueueTest.java @@ -48,7 +48,7 @@ public class DataCacheClearQueueTest { } @Override - public void startAsyncPeriodicSaveTask() throws IllegalArgumentException, IllegalStateException { + public void startAsyncPeriodicSaveTask() { } }; } diff --git a/Plan/test/test/java/main/java/com/djrapitops/plan/data/cache/queue/DataCacheProcessQueueTest.java b/Plan/test/test/java/main/java/com/djrapitops/plan/data/cache/queue/DataCacheProcessQueueTest.java index fd6613001..c98ba03ca 100644 --- a/Plan/test/test/java/main/java/com/djrapitops/plan/data/cache/queue/DataCacheProcessQueueTest.java +++ b/Plan/test/test/java/main/java/com/djrapitops/plan/data/cache/queue/DataCacheProcessQueueTest.java @@ -62,7 +62,7 @@ public class DataCacheProcessQueueTest { } @Override - public void startAsyncPeriodicSaveTask() throws IllegalArgumentException, IllegalStateException { + public void startAsyncPeriodicSaveTask() { } @Override