Skip to content

Commit 9067a42

Browse files
committed
removed unused value from httpheader result and added logger instead of printStacktrace
1 parent 8327c7d commit 9067a42

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/main/java/de/rub/nds/tlsscanner/report/result/HttpHeaderResult.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,18 @@
1717
import java.util.Base64;
1818
import java.util.LinkedList;
1919
import java.util.List;
20+
import org.apache.logging.log4j.LogManager;
21+
import org.apache.logging.log4j.Logger;
2022

2123
public class HttpHeaderResult extends ProbeResult {
2224

25+
private final static Logger LOGGER = LogManager.getLogger();
26+
2327
private List<HttpsHeader> headerList = null;
2428
private TestResult speaksHttps = null;
2529
private TestResult supportsHsts = TestResult.FALSE;
2630
private Long hstsMaxAge = null;
2731
private Integer hpkpMaxAge = null;
28-
private TestResult hstsCeasing = null;
2932
private TestResult hstsIncludesSubdomains = TestResult.FALSE;
3033
private TestResult hpkpIncludesSubdomains = TestResult.FALSE;
3134
private TestResult supportsHstsPreloading = TestResult.FALSE;
@@ -66,7 +69,7 @@ protected void mergeData(SiteReport report) {
6669
try {
6770
hstsMaxAge = Long.parseLong(maxAge[1].trim());
6871
} catch (Exception E) {
69-
E.printStackTrace();
72+
LOGGER.warn("HSTS was not parseable", E);
7073
hstsNotParseable = TestResult.TRUE;
7174
}
7275
} else {
@@ -89,7 +92,7 @@ protected void mergeData(SiteReport report) {
8992
try {
9093
hpkpMaxAge = Integer.parseInt(maxAge[1].trim());
9194
} catch (Exception E) {
92-
E.printStackTrace();
95+
LOGGER.warn("HPKP was not parseable", E);
9396
hpkpNotParseable = TestResult.TRUE;
9497
}
9598
} else {
@@ -116,7 +119,7 @@ protected void mergeData(SiteReport report) {
116119
try {
117120
hpkpMaxAge = Integer.parseInt(maxAge[1].trim());
118121
} catch (Exception E) {
119-
E.printStackTrace();
122+
LOGGER.warn("HPKP was not parseable", E);
120123
hpkpNotParseable = TestResult.TRUE;
121124
}
122125
} else {

0 commit comments

Comments
 (0)