noteId Preconditions

This commit is contained in:
astroshim 2016-10-24 22:34:52 +09:00
parent af8a2d8ca5
commit f38231c3d8

View file

@ -947,16 +947,13 @@ public class InterpreterFactory implements InterpreterGroupFactory {
}
}
private boolean noteIdIsExist(String noteId) {
return noteId == null ? false : true;
}
public void restart(String settingId, String noteId) {
Preconditions.checkNotNull(noteId);
InterpreterSetting intpsetting = interpreterSettings.get(settingId);
Preconditions.checkNotNull(intpsetting);
if (noteIdIsExist(noteId) &&
intpsetting.getOption().isProcess()) {
if (intpsetting.getOption().isProcess()) {
intpsetting.closeAndRemoveInterpreterGroup(noteId);
return;
}