fixed SpotBugs JUA_DONT_ASSERT_INSTANCEOF_IN_TESTS
@@ -25,11 +25,13 @@ package jenkins.util.xstream;
import hudson.util.XStream2;
import org.apache.commons.io.IOUtils;
+import org.hamcrest.core.IsInstanceOf;
import org.junit.Before;
import org.junit.Test;
import org.xmlunit.diff.DefaultNodeMatcher;
import org.xmlunit.diff.ElementSelectors;
+import static org.hamcrest.Matchers.instanceOf;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.hamcrest.MatcherAssert.assertThat;
@@ -141,7 +143,7 @@ public class XStreamDOMTest {
v.values.put("foo",createSomeFoo().bar);
String xml = xs.toXML(v);
Object v2 = xs.fromXML(xml);
- assertTrue(v2 instanceof DomInMap);
+ assertThat(v2, instanceOf(DomInMap.class));
assertXStreamDOMEquals(v.values.get("foo"), ((DomInMap)v2).values.get("foo"));
}
