This is an automated email from the ASF dual-hosted git repository. reta pushed a commit to branch 3.2.x-fixes in repository https://gitbox.apache.org/repos/asf/cxf.git
commit 4a3248c3e27e57b79c2c7961b1701f7aa220229d 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. (cherry picked from commit f5f8b798bb59065d91ac14819fa669fe9c3ebe57) (cherry picked from commit f16c5b27e4c4668ae54c66881e4a3a9bb6841994) --- .../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 d94440c..f7a38c9 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 @@ -132,7 +132,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; @@ -664,8 +664,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); @@ -702,9 +702,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()); }
