Skip to content

Commit c99650c

Browse files
author
Vincent Potucek
committed
Test unused stream in DefaultPluginXmlFactory#write
1 parent f7e0024 commit c99650c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

impl/maven-impl/src/main/java/org/apache/maven/impl/ReadRequest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ record ReadRequest(
4848
request.isStrict());
4949

5050
if (inputStream == null && reader == null && path == null && url == null) {
51-
throw new IllegalArgumentException("At least one of path, url, reader or inputStream must be non-null");
51+
throw new IllegalArgumentException("Given input is null.");
5252
}
5353
}
5454

impl/maven-impl/src/main/java/org/apache/maven/impl/WriteRequest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ record WriteRequest(Path path, OutputStream outputStream, Writer writer, PluginD
4040
this(request.getPath(), request.getOutputStream(), request.getWriter(), request.getContent());
4141

4242
if (writer == null && outputStream == null && path == null) {
43-
throw new IllegalArgumentException("writer, outputStream or path must be non null");
43+
throw new IllegalArgumentException("Given input is null.");
4444
}
4545
}
4646

impl/maven-impl/src/test/java/org/apache/maven/impl/DefaultPluginXmlFactoryTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ void writeWithNoTargetThrowsIllegalArgumentException() {
229229
.build())
230230
.build()))
231231
.getMessage())
232-
.isEqualTo("writer, output stream, or path must be non null");
232+
.isEqualTo("Given input is null.");
233233
}
234234

235235
@Test

0 commit comments

Comments
 (0)