!856 update 优化代码,简化类型检查

* update 优化代码,简化类型检查
This commit is contained in:
AprilWind
2026-06-10 06:38:46 +00:00
committed by 疯狂的狮子Li
parent fc43e368b7
commit 0b37392a8f
12 changed files with 44 additions and 29 deletions
@@ -98,9 +98,8 @@ public class ThreadPoolConfig {
* @param t 任务执行过程中抛出的异常
*/
public static void printException(Runnable r, Throwable t) {
if (t == null && r instanceof Future<?>) {
if (t == null && r instanceof Future<?> future) {
try {
Future<?> future = (Future<?>) r;
if (future.isDone()) {
future.get();
}
@@ -12,7 +12,6 @@ import java.lang.reflect.Method;
*
* @author Lion Li
*/
@SuppressWarnings("rawtypes")
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class ReflectUtils extends ReflectUtil {