Avoid NPE when the expected tree is indeed null

This commit is contained in:
Andreas Kohn 2014-03-17 12:15:38 +01:00
parent 52aa7e974b
commit 9bb7b62987

View File

@ -966,6 +966,7 @@ public class JPEGImageReaderTest extends ImageReaderAbstractTestCase<JPEGImageRe
if (expectedTree == null) { if (expectedTree == null) {
assertNull(actualTree); assertNull(actualTree);
return;
} }
assertEquals(String.format("%s: Node names differ", message), expectedTree.getNodeName(), actualTree.getNodeName()); assertEquals(String.format("%s: Node names differ", message), expectedTree.getNodeName(), actualTree.getNodeName());