diff --git a/pom.xml b/pom.xml
index 8a3e450..71cefe3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -41,7 +41,8 @@
3.27.7
2.21.0
3.20.0
- 0.8.13
+
+ 0.8.14
4.0.4
4.0.6
1.18.42
@@ -52,6 +53,8 @@
12.9
2.0.17
4.0.11
+
+ false
@@ -110,6 +113,7 @@
true
+
org.apache.commons
commons-lang3
@@ -138,6 +142,7 @@
4.13.2
test
+
commons-io
commons-io
@@ -296,6 +301,14 @@
See: https://inside.java/2024/06/18/quality-heads-up/
-->
full
+
+
+
+ org.projectlombok
+ lombok
+ ${version.lombok}
+
+
@@ -383,7 +396,7 @@
-
+
org.jvnet.jaxb
jaxb-maven-plugin
@@ -413,7 +426,7 @@
-
+
org.jacoco
jacoco-maven-plugin
@@ -618,6 +631,10 @@
validate
+
+
+ ${skipFormatterValidation}
+
diff --git a/src/main/java/de/kosit/validationtool/impl/input/SourceInput.java b/src/main/java/de/kosit/validationtool/impl/input/SourceInput.java
index 60c926e..aed8cc5 100644
--- a/src/main/java/de/kosit/validationtool/impl/input/SourceInput.java
+++ b/src/main/java/de/kosit/validationtool/impl/input/SourceInput.java
@@ -110,7 +110,12 @@ public class SourceInput extends AbstractInput {
return (ss.getInputStream() != null && ss.getInputStream().available() == 0)
|| (ss.getReader() != null && !ss.getReader().ready());
} catch (final IOException e) {
- log.error("Error checking consumed state", e);
+ // Stream/reader closed is an expected outcome when consumed; avoid ERROR log
+ if (e.getMessage() == null || !e.getMessage().toLowerCase().contains("closed")) {
+ log.error("Error checking consumed state", e);
+ } else {
+ log.debug("Stream/reader closed when checking consumed state", e);
+ }
return true;
}
}
diff --git a/src/test/java/de/kosit/validationtool/cmd/CommandlineApplicationTest.java b/src/test/java/de/kosit/validationtool/cmd/CommandlineApplicationTest.java
index dce14d4..f087b07 100644
--- a/src/test/java/de/kosit/validationtool/cmd/CommandlineApplicationTest.java
+++ b/src/test/java/de/kosit/validationtool/cmd/CommandlineApplicationTest.java
@@ -150,8 +150,9 @@ public class CommandlineApplicationTest {
@Test
public void testValidNamingConfiguration() {
- final String[] args = { "-s", Paths.get(Simple.SCENARIOS).toString(), "-r", Paths.get(Simple.REPOSITORY_URI).toString(),
- Paths.get(Simple.SIMPLE_VALID).toString(), "--report-prefix", "somePrefix", "--report-postfix", "somePostfix" };
+ final String[] args = { "-s", Paths.get(Simple.SCENARIOS).toString(), "-o", this.output.toString(), "-r",
+ Paths.get(Simple.REPOSITORY_URI).toString(), Paths.get(Simple.SIMPLE_VALID).toString(), "--report-prefix", "somePrefix",
+ "--report-postfix", "somePostfix" };
CommandLineApplication.mainProgram(args);
assertThat(CommandLine.getErrorOutput()).contains(RESULT_OUTPUT);
assertThat(CommandLine.getErrorOutput()).contains("somePrefix-simple-somePostfix");
@@ -249,8 +250,8 @@ public class CommandlineApplicationTest {
@Test
public void testAndre() {
- final String[] args = { "-s", Paths.get(Simple.SCENARIOS).toString(), "-r", Paths.get(Simple.REPOSITORY_URI).toString(),
- Paths.get(Simple.SIMPLE_VALID).toString(), "--report-prefix", "andre1" };
+ final String[] args = { "-s", Paths.get(Simple.SCENARIOS).toString(), "-o", this.output.toString(), "-r",
+ Paths.get(Simple.REPOSITORY_URI).toString(), Paths.get(Simple.SIMPLE_VALID).toString(), "--report-prefix", "andre1" };
CommandLineApplication.mainProgram(args);
assertThat(CommandLine.getErrorOutput()).contains(RESULT_OUTPUT);
}