mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-21 05:50:18 +08:00
removed IllegalStateException or IllegalArgumentException throws from method signatures
This commit is contained in:
parent
6a29bfae16
commit
bf21aae791
@ -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)) {
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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() {
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ public class DataCacheClearQueueTest {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startAsyncPeriodicSaveTask() throws IllegalArgumentException, IllegalStateException {
|
||||
public void startAsyncPeriodicSaveTask() {
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ public class DataCacheProcessQueueTest {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startAsyncPeriodicSaveTask() throws IllegalArgumentException, IllegalStateException {
|
||||
public void startAsyncPeriodicSaveTask() {
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user