This is an automated email from the ASF dual-hosted git repository.
reta pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git
The following commit(s) were added to refs/heads/master by this push:
new f5f8b79 CXF-8161: fix memory leak and thread leak in JMSDestination.
Minor test cleanups.
f5f8b79 is described below
commit f5f8b798bb59065d91ac14819fa669fe9c3ebe57
Author: reta <[email protected]>
AuthorDate: Tue Dec 17 19:21:54 2019 -0500
CXF-8161: fix memory leak and thread leak in JMSDestination. Minor test
cleanups.
---
.../org/apache/cxf/transport/jms/JMSDestinationTest.java | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git
a/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSDestinationTest.java
b/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSDestinationTest.java
index a409ffb..549f891 100644
---
a/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSDestinationTest.java
+++
b/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSDestinationTest.java
@@ -126,7 +126,7 @@ public class JMSDestinationTest extends AbstractJMSTester {
}
private static final class FaultyConnectionFactory implements
ConnectionFactory {
- final AtomicInteger latch;
+ private final AtomicInteger latch;
private final ConnectionFactory delegate;
private final Function<Connection, Connection> wrapper;
@@ -580,8 +580,8 @@ public class JMSDestinationTest extends AbstractJMSTester {
@Override
public Session createSession(boolean transacted, int
acknowledgeMode) throws JMSException {
// Fail five times, starting with on successful call
- final int latchValue = latch.getAndDecrement();
- if (latchValue >= 0 && latchValue < 5) {
+ final int value = latch.getAndDecrement();
+ if (value >= 0 && value < 5) {
throw new JMSException("createSession() failed
(simulated)");
} else {
return super.createSession(transacted, acknowledgeMode);
@@ -617,9 +617,9 @@ public class JMSDestinationTest extends AbstractJMSTester {
conduit.close();
destination.shutdown();
- assertEquals("Only two createConnection() calls allowed because "
- + "restartConnection() should be called only once.",
- -2, faultyConnectionFactory.latch.get());
+
+ assertEquals("Only two createConnection() calls allowed because
restartConnection() should be "
+ + "called only once.", -2, faultyConnectionFactory.latch.get());
}