Skip to content

Commit a25c980

Browse files
author
Vincent Potucek
committed
Pull #2303: Fix unused stream os in DefaultPluginXmlFactory#write
1 parent 49b52ae commit a25c980

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
import org.junit.jupiter.api.Test;
4040
import org.junit.jupiter.api.io.TempDir;
4141

42+
import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
4243
import static org.junit.jupiter.api.Assertions.assertEquals;
4344
import static org.junit.jupiter.api.Assertions.assertInstanceOf;
4445
import static org.junit.jupiter.api.Assertions.assertThrows;
@@ -229,7 +230,7 @@ void readMalformedXmlThrowsXmlReaderException() {
229230
() -> defaultPluginXmlFactory.read(XmlReaderRequest.builder()
230231
.inputStream(new ByteArrayInputStream("<plugin><name>Broken Plugin".getBytes()))
231232
.build()));
232-
assertTrue(exception.getMessage().contains("Unable to read plugin"));
233+
assertThat(exception.getMessage()).contains("Unable to read plugin");
233234
assertInstanceOf(WstxEOFException.class, exception.getCause());
234235
}
235236

0 commit comments

Comments
 (0)