From 8bc470c3aac852a19a86d526eb03f5416700c8b9 Mon Sep 17 00:00:00 2001 From: Gerd Aschemann Date: Mon, 25 Nov 2024 07:48:19 +0100 Subject: [PATCH] WIP 314 Remove duplicate condition check Perhaps it was left from some merge action? --- .../htmlsanitycheck/maven/HtmlSanityCheckMojo.java | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/htmlSanityCheck-maven-plugin/src/main/java/org/aim42/htmlsanitycheck/maven/HtmlSanityCheckMojo.java b/htmlSanityCheck-maven-plugin/src/main/java/org/aim42/htmlsanitycheck/maven/HtmlSanityCheckMojo.java index 6d059d8f..51642033 100644 --- a/htmlSanityCheck-maven-plugin/src/main/java/org/aim42/htmlsanitycheck/maven/HtmlSanityCheckMojo.java +++ b/htmlSanityCheck-maven-plugin/src/main/java/org/aim42/htmlsanitycheck/maven/HtmlSanityCheckMojo.java @@ -67,10 +67,10 @@ public class HtmlSanityCheckMojo extends AbstractMojo { public void execute() throws MojoExecutionException { logBuildParameter(); -// Setup configuration + // Setup configuration Configuration myConfig = setupConfiguration(); -// Check if configuration is valid + // Check if configuration is valid try { myConfig.validate(); // Create output directories @@ -100,12 +100,6 @@ public void execute() throws MojoExecutionException { ); throw new MojoExecutionException(failureMsg); } - if (junitResultsDir != null) { - junitResultsDir.mkdirs(); - if (!junitResultsDir.isDirectory() || !junitResultsDir.canWrite()) { - throw new MojoExecutionException("Cannot write to JUnit results directory."); - } - } } catch (MisconfigurationException e) { throw new MojoExecutionException(e); } catch (IOException e) { @@ -146,7 +140,7 @@ protected Configuration setupConfiguration() { if (httpSuccessCodes != null && !httpSuccessCodes.isEmpty()) { result.overrideHttpSuccessCodes(httpSuccessCodes); } - if (httpErrorCodes != null && !httpErrorCodes.isEmpty()) { + if (httpErrorCodes != null && !httpErrorCodes.isEmpty()) { result.overrideHttpErrorCodes(httpErrorCodes); } if (httpErrorCodes != null && !httpWarningCodes.isEmpty()) {