Skip to content

Commit b46097d

Browse files
author
Suchita Chaturvedi
committed
6878: Update Spotbugs latest version in jmc 8.0.0 source
Reviewed-by: hirt
1 parent d2a600a commit b46097d

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

application/tests/org.openjdk.jmc.joverflow.test/src/test/java/org/openjdk/jmc/joverflow/heap/model/TestJavaObjectTable.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved.
33
*
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
@@ -53,7 +53,7 @@ public void testTableWithSingleObject() throws Exception {
5353
JavaObjectTable table = builder.buildJavaObjectTable(classes);
5454

5555
JavaLazyReadObject obj = table.getObject(objPosInTable);
56-
Assert.assertTrue(obj instanceof JavaObject);
56+
Assert.assertTrue(JavaObject.class.isInstance(obj));
5757
Assert.assertEquals(fooClass, obj.getClazz());
5858
Assert.assertEquals(10, obj.getObjOfsInFile());
5959
}
@@ -95,15 +95,15 @@ public void testTableWithManyObjects() throws Exception {
9595
JavaLazyReadObject obj = table.getObject(objPosInTable[i]);
9696

9797
if (i % 2 == 0) {
98-
Assert.assertTrue(obj instanceof JavaObject);
98+
Assert.assertTrue(JavaObject.class.isInstance(obj));
9999
Assert.assertEquals(fooClass, obj.getClazz());
100100
Assert.assertFalse(obj.isVisited());
101101
Assert.assertFalse(obj.isVisitedAsCollectionImpl());
102102
obj.setVisited();
103103
Assert.assertTrue(obj.isVisited());
104104
Assert.assertFalse(obj.isVisitedAsCollectionImpl());
105105
} else {
106-
Assert.assertTrue(obj instanceof JavaObjectArray);
106+
Assert.assertTrue(JavaObjectArray.class.isInstance(obj));
107107
Assert.assertEquals(barClass, obj.getClazz());
108108
Assert.assertEquals(arrLen, ((JavaObjectArray) obj).getLength());
109109
Assert.assertFalse(obj.isVisited());
@@ -123,12 +123,12 @@ public void testTableWithManyObjects() throws Exception {
123123
Assert.assertEquals("i = " + i, objOfsInFile, obj.getObjOfsInFile());
124124

125125
if (i % 2 == 0) {
126-
Assert.assertTrue("i = " + i, obj instanceof JavaObject);
126+
Assert.assertTrue("i = " + i, JavaObject.class.isInstance(obj));
127127
Assert.assertEquals("i = " + i, fooClass, obj.getClazz());
128128
Assert.assertTrue(obj.isVisited());
129129
Assert.assertFalse(obj.isVisitedAsCollectionImpl());
130130
} else {
131-
Assert.assertTrue("i = " + i, obj instanceof JavaObjectArray);
131+
Assert.assertTrue("i = " + i, JavaObjectArray.class.isInstance(obj));
132132
Assert.assertEquals("i = " + i, barClass, obj.getClazz());
133133
Assert.assertEquals("i = " + i, arrLen, ((JavaObjectArray) obj).getLength());
134134
Assert.assertFalse(obj.isVisited());
@@ -179,10 +179,10 @@ public void testIteratingUnvisitedObjects() throws Exception {
179179
Assert.assertEquals("i = " + i, objOfsInFile, obj.getObjOfsInFile());
180180

181181
if (i % 2 == 0) {
182-
Assert.assertTrue("i = " + i, obj instanceof JavaObject);
182+
Assert.assertTrue("i = " + i, JavaObject.class.isInstance(obj));
183183
Assert.assertEquals("i = " + i, fooClass, obj.getClazz());
184184
} else {
185-
Assert.assertTrue("i = " + i, obj instanceof JavaObjectArray);
185+
Assert.assertTrue("i = " + i, JavaObjectArray.class.isInstance(obj));
186186
Assert.assertEquals("i = " + i, barClass, obj.getClazz());
187187
Assert.assertEquals("i = " + i, arrLen, ((JavaObjectArray) obj).getLength());
188188
}

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
<maven.resources.version>3.2.0</maven.resources.version>
8686
<spotless.version>2.5.0</spotless.version>
8787
<spotless.config.path>${basedir}/configuration/ide/eclipse/formatting/formatting.xml</spotless.config.path>
88-
<spotbugs.version>4.0.4</spotbugs.version>
88+
<spotbugs.version>4.1.4</spotbugs.version>
8989
<buildId>${user.name}</buildId>
9090
<!-- The version of the JDK embedded. When not embedding a JDK (this is
9191
usually the case), leave this empty. If embedding a JDK, include a comma

0 commit comments

Comments
 (0)