change: 精简多余的判断.

This commit is contained in:
2025-01-15 08:40:22 +08:00
parent c546f855e1
commit 54e6f56bc6

View File

@@ -73,8 +73,7 @@ public final class BreakageUnidirectionalStateManager<S> extends DefaultUnidirec
/* /*
* 非最后一个状态且切换后的状态必须在当前状态的下位 * 非最后一个状态且切换后的状态必须在当前状态的下位
*/ */
if (isLast() || if (indexOf(state) <= currentIndex()) {
indexOf(state) <= currentIndex()) {
if (allowThrow) if (allowThrow)
throw new StateException("The last state has been reached and cannot be switched again!"); throw new StateException("The last state has been reached and cannot be switched again!");
return false; return false;