removed IllegalStateException or IllegalArgumentException throws from method signatures

This commit is contained in:
Rsl1122 2017-08-16 10:44:03 +03:00
parent 6a29bfae16
commit bf21aae791
6 changed files with 6 additions and 6 deletions

View File

@ -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)) {

View File

@ -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;

View File

@ -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);

View File

@ -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() {
}
};
}

View File

@ -48,7 +48,7 @@ public class DataCacheClearQueueTest {
}
@Override
public void startAsyncPeriodicSaveTask() throws IllegalArgumentException, IllegalStateException {
public void startAsyncPeriodicSaveTask() {
}
};
}

View File

@ -62,7 +62,7 @@ public class DataCacheProcessQueueTest {
}
@Override
public void startAsyncPeriodicSaveTask() throws IllegalArgumentException, IllegalStateException {
public void startAsyncPeriodicSaveTask() {
}
@Override