Skip to content

Commit 7c41ac2

Browse files
author
Vincent Potucek
committed
Pull #3003: fix unused stream in DefaultPluginXmlFactory#write
1 parent fb48560 commit 7c41ac2

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
@@ -22,6 +22,7 @@
2222
import java.nio.file.Files;
2323
import java.nio.file.Path;
2424

25+
import org.apache.maven.api.annotations.Nonnull;
2526
import org.apache.maven.api.plugin.descriptor.PluginDescriptor;
2627
import org.apache.maven.api.services.xml.XmlReaderException;
2728
import org.apache.maven.api.services.xml.XmlReaderRequest;
@@ -227,7 +228,7 @@ void shouldThrowXmlReaderExceptionOnMalformedXml() {
227228

228229
XmlReaderException exception = assertThrows(XmlReaderException.class, () -> sut.read(request));
229230
assertTrue(exception.getMessage().contains("Unable to read plugin"));
230-
assertTrue(exception.getCause() instanceof Exception);
231+
assertInstanceOf(Exception.class, exception.getCause());
231232
}
232233

233234

0 commit comments

Comments
 (0)