[prev in list] [next in list] [prev in thread] [next in thread]
List: activemq-commits
Subject: [activemq-artemis] branch main updated: NO-JIRA: update to errorprone 2.9.0, fix errors, enable it w
From: robbie () apache ! org
Date: 2021-09-29 11:21:27
Message-ID: 163291448766.19797.17717697091486809476 () gitbox ! apache ! org
[Download RAW message or body]
This is an automated email from the ASF dual-hosted git repository.
robbie pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
The following commit(s) were added to refs/heads/main by this push:
new 2051137 NO-JIRA: update to errorprone 2.9.0, fix errors, enable it when \
running on Java 17+ 2051137 is described below
commit 20511375de9b57740ea56349e203992815f07d2f
Author: Robbie Gemmell <robbie@apache.org>
AuthorDate: Wed Sep 29 11:55:40 2021 +0100
NO-JIRA: update to errorprone 2.9.0, fix errors, enable it when running on Java \
17+
---
.../artemis/utils/TypedPropertiesConcurrencyTest.java | 16 ++++------------
.../artemis/core/config/impl/ConfigurationImplTest.java | 3 ++-
pom.xml | 6 +++---
.../tests/integration/cluster/bridge/BridgeTest.java | 2 +-
.../activemq/artemis/tests/unit/util/LinkedListTest.java | 2 +-
5 files changed, 11 insertions(+), 18 deletions(-)
diff --git a/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/TypedPropertiesConcurrencyTest.java \
b/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/TypedPropertiesConcurrencyTest.java
index 9e9e86a..ceeb733 100644
--- a/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/TypedPropertiesConcurrencyTest.java
+++ b/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/TypedPropertiesConcurrencyTest.java
@@ -16,6 +16,8 @@
*/
package org.apache.activemq.artemis.utils;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
import java.util.ConcurrentModificationException;
import java.util.concurrent.CountDownLatch;
@@ -26,18 +28,10 @@ import java.util.concurrent.atomic.AtomicBoolean;
import org.apache.activemq.artemis.api.core.SimpleString;
import org.apache.activemq.artemis.utils.collections.TypedProperties;
import org.junit.Assert;
-import static org.junit.Assert.assertEquals;
import org.junit.Test;
public class TypedPropertiesConcurrencyTest {
- // Constructors --------------------------------------------------
-
- // Public --------------------------------------------------------
-
-
- private SimpleString key = SimpleString.toSimpleString("key");
-
@Test
public void testClearAndToString() throws Exception {
TypedProperties props = new TypedProperties();
@@ -67,7 +61,7 @@ public class TypedPropertiesConcurrencyTest {
try {
countDownLatch.await();
for (int k = 0; k < 1000; k++) {
- props.toString();
+ assertNotNull(props.toString());
}
} catch (ConcurrentModificationException t) {
hasError.set(true);
@@ -86,7 +80,6 @@ public class TypedPropertiesConcurrencyTest {
Assert.assertFalse(hasError.get());
}
-
@Test
public void testGetPropertyNamesClearAndToString() throws Exception {
TypedProperties props = new TypedProperties();
@@ -118,7 +111,7 @@ public class TypedPropertiesConcurrencyTest {
try {
countDownLatch.await();
for (int k = 0; k < 1000; k++) {
- props.toString();
+ assertNotNull(props.toString());
}
} catch (ConcurrentModificationException t) {
hasError.set(true);
@@ -137,7 +130,6 @@ public class TypedPropertiesConcurrencyTest {
Assert.assertFalse(hasError.get());
}
-
@Test
public void testEncodedSizeAfterClearIsSameAsNewTypedProperties() throws \
Exception { TypedProperties props = new TypedProperties();
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImplTest.java \
b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImplTest.java
index de47b46..146386d 100644
--- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImplTest.java
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImplTest.java
@@ -99,7 +99,8 @@ public class ConfigurationImplTest extends ActiveMQTestBase {
public void testNullMaskPassword() {
ConfigurationImpl impl = new ConfigurationImpl();
impl.setMaskPassword(null);
- impl.hashCode();
+
+ Assert.assertEquals(impl.hashCode(), impl.hashCode());
}
@Test
diff --git a/pom.xml b/pom.xml
index 5c621d4..27cd5d9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -100,7 +100,7 @@
<jboss.logging.version>3.4.2.Final</jboss.logging.version>
<jetty.version>9.4.43.v20210629</jetty.version>
<jgroups.version>3.6.13.Final</jgroups.version>
- <errorprone.version>2.6.0</errorprone.version>
+ <errorprone.version>2.9.0</errorprone.version>
<maven.enforcer.plugin.version>3.0.0-M3</maven.enforcer.plugin.version>
<maven.bundle.plugin.version>5.1.2</maven.bundle.plugin.version>
<maven.checkstyle.plugin.version>3.1.1</maven.checkstyle.plugin.version>
@@ -1028,10 +1028,10 @@
</build>
</profile>
<profile>
- <id>jdk16-errorprone</id>
+ <id>jdk16on-errorprone</id>
<!-- TODO: MissingOverride check only warns in this profile for now, as \
JDK15+ added a toString method to CharSequence --> <activation>
- <jdk>16</jdk>
+ <jdk>[16,)</jdk>
<property>
<name>errorprone</name>
</property>
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTest.java \
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTest.java
index 96b0446..3946933 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTest.java
@@ -871,7 +871,7 @@ public class BridgeTest extends ActiveMQTestBase {
LinkedListIterator<MessageReference> iterator = queue.iterator();
for (int i = 0; i < 100; i++) {
- iterator.hasNext();
+ assertTrue(iterator.hasNext());
ids[i] = iterator.next().getMessage().getMessageID();
}
diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/LinkedListTest.java \
b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/LinkedListTest.java
index 5d755c9..be4619c 100644
--- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/LinkedListTest.java
+++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/LinkedListTest.java
@@ -1091,7 +1091,7 @@ public class LinkedListTest extends ActiveMQTestBase {
iter.next();
iter.next();
iter.next();
- iter.hasNext();
+ assertTrue(iter.hasNext());
assertEquals(4, iter.next().intValue());
iter.repeat();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic