From 1c7c28f03215f03e97387d7e6b45ae752c396dcb Mon Sep 17 00:00:00 2001
From: HunterHuang0X7C7 <1125607007@qq.com>
Date: 星期六, 12 八月 2023 16:58:15 +0800
Subject: [PATCH] 去掉无用引用,优化退出卡死和窗口泄露,优化开启后启动报错
---
src/main/java/com/github/hunter0x7c7/sync/utils/DateUtils.java | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/src/main/java/com/github/hunter0x7c7/sync/utils/DateUtils.java b/src/main/java/com/github/hunter0x7c7/sync/utils/DateUtils.java
index 664f290..aa4f0fe 100644
--- a/src/main/java/com/github/hunter0x7c7/sync/utils/DateUtils.java
+++ b/src/main/java/com/github/hunter0x7c7/sync/utils/DateUtils.java
@@ -1,14 +1,11 @@
package com.github.hunter0x7c7.sync.utils;
-import org.apache.http.annotation.Immutable;
-import org.apache.http.util.Args;
import java.lang.ref.SoftReference;
import java.text.ParsePosition;
import java.text.SimpleDateFormat;
import java.util.*;
-@Immutable
public final class DateUtils {
public static final String PATTERN_Def = "yyyy-MM-dd HH:mm:ss";
public static final String PATTERN_RFC1123 = "EEE, dd MMM yyyy HH:mm:ss zzz";
@@ -110,4 +107,15 @@
THREADLOCAL_FORMATS.remove();
}
}
+
+ public static class Args {
+
+ public static void notNull(Object o, String msg) {
+ if (o == null) {
+ throw new RuntimeException(msg + " is not null!");
+ }
+ }
+ }
+
+
}
--
Gitblit v1.9.1