update 优化整体代码 适配jdk17

This commit is contained in:
疯狂的狮子li
2023-05-23 13:27:46 +08:00
parent 55c3e7687b
commit 8ad97f6e69
100 changed files with 347 additions and 460 deletions

View File

@@ -6,6 +6,8 @@ import cn.hutool.core.util.CharUtil;
import cn.hutool.core.util.RandomUtil;
import org.dromara.common.core.utils.StringUtils;
import java.io.Serial;
/**
* 无符号计算生成器
*
@@ -13,6 +15,7 @@ import org.dromara.common.core.utils.StringUtils;
*/
public class UnsignedMathGenerator implements CodeGenerator {
@Serial
private static final long serialVersionUID = -5514819971774091076L;
private static final String OPERATORS = "+-*";

View File

@@ -33,8 +33,7 @@ public class GatewayExceptionHandler implements ErrorWebExceptionHandler {
if (ex instanceof NotFoundException) {
msg = "服务未找到";
} else if (ex instanceof ResponseStatusException) {
ResponseStatusException responseStatusException = (ResponseStatusException) ex;
} else if (ex instanceof ResponseStatusException responseStatusException) {
msg = responseStatusException.getMessage();
} else {
msg = "内部服务器错误";