You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since we use contains to judge the status, it's better to use Set rather than List, and this also make the code consistent with other enums, in other enums, they all use set.
// Determine whether the current state can be deletedif (!EntityStatus.ALLOW_DELETE_BIZ_STATUS.contains(entity.getStatus())) {
LOGGER.error("current status was not allowed to delete");
thrownewBusinessException(BizErrorCodeEnum.BUSINESS_DELETE_NOT_ALLOWED);
}
Description
https://github.com/apache/incubator-inlong/blob/73d149610e1d88913a65529a5bb003bf1ea058a7/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/enums/EntityStatus.java#L72-L114
Use case
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: