Author: jim.ma
Date: 2014-04-01 05:46:30 -0400 (Tue, 01 Apr 2014)
New Revision: 18554
Modified:
stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/JBossWSTestSetup.java
Log:
Minor fix: no need to use AtomicLong
Modified:
stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/JBossWSTestSetup.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/JBossWSTestSetup.java 2014-04-01
07:50:47 UTC (rev 18553)
+++
stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/JBossWSTestSetup.java 2014-04-01
09:46:30 UTC (rev 18554)
@@ -31,7 +31,6 @@
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;
-import java.util.concurrent.atomic.AtomicLong;
import javax.management.MBeanServerConnection;
import javax.naming.NamingException;
@@ -70,7 +69,7 @@
private Map<String, String> httpsConnOptions;
private CleanupOperation cleanupOp;
- private static volatile AtomicLong lastHttpsConnectorRemoval = new AtomicLong(0);
+ private static volatile long lastHttpsConnectorRemoval = 0;
public JBossWSTestSetup(Class<?> testClass, String archiveList)
{
@@ -255,7 +254,7 @@
Thread.currentThread().setContextClassLoader(cl);
}
if (httpsConnOptions != null) {
- final long lr = lastHttpsConnectorRemoval.get();
+ final long lr = lastHttpsConnectorRemoval;
if (lr != 0) {
final long wait = HTTPS_CONNECTION_REUSE_TIMEOUT -
(System.currentTimeMillis() - lr);
if (wait > 0) {
@@ -327,7 +326,7 @@
if (httpsConnOptions != null)
{
JBossWSTestHelper.removeHttpsConnector();
- lastHttpsConnectorRemoval.set(System.currentTimeMillis());
+ lastHttpsConnectorRemoval = System.currentTimeMillis();
}
}
}
Show replies by date