mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-12 15:56:00 +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
|
* @throws IllegalStateException If the player has not played on the server
|
||||||
* before.
|
* before.
|
||||||
*/
|
*/
|
||||||
public String getPlayerName(UUID uuid) throws IllegalStateException, IllegalArgumentException {
|
public String getPlayerName(UUID uuid) {
|
||||||
Verify.nullCheck(uuid);
|
Verify.nullCheck(uuid);
|
||||||
IOfflinePlayer offlinePlayer = Fetch.getIOfflinePlayer(uuid);
|
IOfflinePlayer offlinePlayer = Fetch.getIOfflinePlayer(uuid);
|
||||||
if (Verify.notNull(offlinePlayer)) {
|
if (Verify.notNull(offlinePlayer)) {
|
||||||
|
@ -122,7 +122,7 @@ public class DataCacheHandler extends SessionCache {
|
|||||||
* parameters.
|
* parameters.
|
||||||
* @throws IllegalStateException BukkitScheduler is in a wrong state.
|
* @throws IllegalStateException BukkitScheduler is in a wrong state.
|
||||||
*/
|
*/
|
||||||
public void startAsyncPeriodicSaveTask() throws IllegalArgumentException, IllegalStateException {
|
public void startAsyncPeriodicSaveTask() {
|
||||||
int minutes = Settings.SAVE_CACHE_MIN.getNumber();
|
int minutes = Settings.SAVE_CACHE_MIN.getNumber();
|
||||||
if (minutes <= 0) {
|
if (minutes <= 0) {
|
||||||
minutes = 5;
|
minutes = 5;
|
||||||
|
@ -68,7 +68,7 @@ public abstract class TimeKeeper {
|
|||||||
* @throws IllegalArgumentException If new state is null.
|
* @throws IllegalArgumentException If new state is null.
|
||||||
* @throws IllegalStateException If lastStateChange time is higher than playtime.
|
* @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);
|
Verify.nullCheck(newState);
|
||||||
// if (playTime < lastStateChange) {
|
// if (playTime < lastStateChange) {
|
||||||
// throw new IllegalStateException("Given Playtime is lower than last status change time: " + 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);
|
when(plan.getDB()).thenReturn(db);
|
||||||
handler = new DataCacheHandler(plan) {
|
handler = new DataCacheHandler(plan) {
|
||||||
@Override
|
@Override
|
||||||
public void startAsyncPeriodicSaveTask() throws IllegalArgumentException, IllegalStateException {
|
public void startAsyncPeriodicSaveTask() {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ public class DataCacheClearQueueTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void startAsyncPeriodicSaveTask() throws IllegalArgumentException, IllegalStateException {
|
public void startAsyncPeriodicSaveTask() {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ public class DataCacheProcessQueueTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void startAsyncPeriodicSaveTask() throws IllegalArgumentException, IllegalStateException {
|
public void startAsyncPeriodicSaveTask() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user