Мелкий рефакторинг
This commit is contained in:
parent
f017148ef7
commit
659c9cf2ad
@ -53,7 +53,7 @@ public class Autoresponder {
|
|||||||
} catch (NotFoundUnitException e) {
|
} catch (NotFoundUnitException e) {
|
||||||
unit = defaultUnit;
|
unit = defaultUnit;
|
||||||
}
|
}
|
||||||
return unit;
|
return Optional.ofNullable(unit).orElseThrow(NotFoundUnitException::new);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Unit nextUnit(Set<Unit> nextUnits, String message) {
|
private Unit nextUnit(Set<Unit> nextUnits, String message) {
|
||||||
|
Loading…
Reference in New Issue
Block a user