Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes uninstall cause reinstall fail #359

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,6 @@ private void uninstallObject(){
setINSTANCE(null);
Base64Encoder.setInstance(null);
AbstractTomcat.setTomcatVersion(null);
HttpClientUtils.setDoNotVerify(null);
IastProperties.setInstance(null);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
import io.dongtai.iast.agent.manager.EngineManager;
import io.dongtai.iast.agent.monitor.IMonitor;
import io.dongtai.iast.agent.monitor.MonitorDaemonThread;
import io.dongtai.iast.agent.monitor.collector.*;
import io.dongtai.iast.agent.monitor.collector.IPerformanceCollector;
import io.dongtai.iast.agent.monitor.collector.MetricsBindCollectorEnum;
import io.dongtai.iast.agent.report.AgentRegisterReport;
import io.dongtai.iast.agent.util.ThreadUtils;
import io.dongtai.iast.common.entity.performance.PerformanceMetrics;
Expand All @@ -17,9 +18,7 @@
import org.json.JSONObject;

import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import java.net.*;
import java.util.ArrayList;
import java.util.List;

Expand Down Expand Up @@ -90,6 +89,9 @@ public static Integer getDiskUsage() {
}

public static List<PerformanceMetrics> getPerformanceMetrics() {
if (PERFORMANCE_METRICS == null) {
PERFORMANCE_METRICS = new ArrayList<PerformanceMetrics>();
}
return PERFORMANCE_METRICS;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,10 @@ public class HttpClientUtils {
private static final String REQUEST_HEADER_TOKEN_KEY = "Authorization";
private static final String REQUEST_ENCODING_TYPE = "gzip";
private static final String SSL_SIGNATURE = "TLSv1.2";
public static HostnameVerifier DO_NOT_VERIFY = new HttpClientHostnameVerifier();
private final static HostnameVerifier DO_NOT_VERIFY = new HttpClientHostnameVerifier();
private final static IastProperties PROPERTIES = IastProperties.getInstance();
private final static Proxy PROXY = loadProxy();

public static void setDoNotVerify(HostnameVerifier doNotVerify) {
DO_NOT_VERIFY = doNotVerify;
}

public static StringBuilder sendGet(String uri, String arg, String value) {
try {
if (arg != null && value != null) {
Expand Down