diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java index 9d9a21326b6..bbb9648b118 100644 --- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java +++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java @@ -790,7 +790,7 @@ public Object run(ActionContext context) throws Exception { if (noMqttAcceptor) { filters.put("${mqtt-acceptor}", ""); } else { - filters.put("${mqtt-acceptor}",readTextFile(ETC_MQTT_ACCEPTOR_TXT, filters)); + filters.put("${mqtt-acceptor}", readTextFile(ETC_MQTT_ACCEPTOR_TXT, filters)); } if (noStompAcceptor) { diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/perf/LiveStatistics.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/perf/LiveStatistics.java index da0b3765ef9..c1ce26170c0 100644 --- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/perf/LiveStatistics.java +++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/perf/LiveStatistics.java @@ -249,7 +249,7 @@ private void appendJsonIntervalSampleOnFile(final boolean warmup, final ReportIn jsonBuilder.add("sampleType", "interval"); jsonBuilder.add("warmup", warmup); jsonBuilder.add("time", sampleTime); - addRate(jsonBuilder,"sent", sentMsg, interval); + addRate(jsonBuilder, "sent", sentMsg, interval); addRate(jsonBuilder, "delayed", blockedMsg, interval); addRate(jsonBuilder, "completed", completedMsg, interval); addRate(jsonBuilder, "received", receivedMsg, interval); diff --git a/artemis-cli/src/test/java/org/apache/activemq/cli/test/ArtemisTest.java b/artemis-cli/src/test/java/org/apache/activemq/cli/test/ArtemisTest.java index 820b7705508..5be97d77592 100644 --- a/artemis-cli/src/test/java/org/apache/activemq/cli/test/ArtemisTest.java +++ b/artemis-cli/src/test/java/org/apache/activemq/cli/test/ArtemisTest.java @@ -2288,7 +2288,7 @@ private String getStoredPassword(String user, File userFile, boolean basicSecuri } private boolean checkPassword(String user, String password, File userFile) throws Exception { - return checkPassword(user, password, userFile,false); + return checkPassword(user, password, userFile, false); } private boolean checkPassword(String user, String password, File userFile, boolean basicSecurityManager) throws Exception { diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQBuffers.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQBuffers.java index d14f9dc05d9..328d3c8038e 100644 --- a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQBuffers.java +++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQBuffers.java @@ -41,7 +41,7 @@ public static ActiveMQBuffer dynamicBuffer(final int size) { } public static ActiveMQBuffer pooledBuffer(final int size) { - return new ChannelBufferWrapper(ALLOCATOR.heapBuffer(size),true, true); + return new ChannelBufferWrapper(ALLOCATOR.heapBuffer(size), true, true); } /** diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/core/buffers/impl/ChannelBufferWrapper.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/core/buffers/impl/ChannelBufferWrapper.java index e1848bf7ab9..dbf27bb3504 100644 --- a/artemis-commons/src/main/java/org/apache/activemq/artemis/core/buffers/impl/ChannelBufferWrapper.java +++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/core/buffers/impl/ChannelBufferWrapper.java @@ -398,10 +398,10 @@ public ActiveMQBuffer readSlice(final int length) { int read = fromBuffer.readerIndex(); int writ = fromBuffer.writerIndex(); fromBuffer.readerIndex(0); - fromBuffer.readBytes(newNettyBuffer,0,writ); - newNettyBuffer.setIndex(read,writ); - ActiveMQBuffer returnBuffer = new ChannelBufferWrapper(newNettyBuffer,releasable,false); - returnBuffer.setIndex(read,writ); + fromBuffer.readBytes(newNettyBuffer, 0, writ); + newNettyBuffer.setIndex(read, writ); + ActiveMQBuffer returnBuffer = new ChannelBufferWrapper(newNettyBuffer, releasable, false); + returnBuffer.setIndex(read, writ); return returnBuffer; } return new ChannelBufferWrapper(buffer.readSlice(length), releasable, isPooled); diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/DefaultSensitiveStringCodec.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/DefaultSensitiveStringCodec.java index 00cf463a1ec..16fcfc9e6b4 100644 --- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/DefaultSensitiveStringCodec.java +++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/DefaultSensitiveStringCodec.java @@ -229,7 +229,7 @@ protected String getFromEnv(final String envVarName) { } public static String envVarNameFromSystemPropertyName(final String systemPropertyName) { - return systemPropertyName.replace(".","_").toUpperCase(Locale.getDefault()); + return systemPropertyName.replace(".", "_").toUpperCase(Locale.getDefault()); } private static class PBKDF2Algorithm extends CodecAlgorithm { diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/NoOpMap.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/NoOpMap.java index d5893edf183..8857ca693c2 100644 --- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/NoOpMap.java +++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/NoOpMap.java @@ -31,13 +31,13 @@ * @param the key type. * @param the value type. */ -public class NoOpMap extends AbstractMap { +public class NoOpMap extends AbstractMap { private static final Map NO_OP_MAP = new NoOpMap<>(); @SuppressWarnings("unchecked") - public static Map instance() { - return (Map) NO_OP_MAP; + public static Map instance() { + return (Map) NO_OP_MAP; } private NoOpMap() { @@ -84,7 +84,7 @@ public Collection values() { } @Override - public Set> entrySet() { + public Set> entrySet() { return Collections.emptySet(); } diff --git a/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/SizeAwareMetricTest.java b/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/SizeAwareMetricTest.java index 7846795b90c..16969c2173a 100644 --- a/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/SizeAwareMetricTest.java +++ b/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/SizeAwareMetricTest.java @@ -231,7 +231,7 @@ public void testMultipleSizeAdd() throws Exception { @Test public void testMaxElements() { - SizeAwareMetric metric = new SizeAwareMetric(10000, 500, 10,10); + SizeAwareMetric metric = new SizeAwareMetric(10000, 500, 10, 10); AtomicBoolean over = new AtomicBoolean(false); metric.setOverCallback(() -> over.set(true)); @@ -255,8 +255,8 @@ public void testMaxElements() { } @Test public void testMaxElementsReleaseNonSizeParentMetric() { - SizeAwareMetric metricMain = new SizeAwareMetric(10000, 500, 10,10); - SizeAwareMetric metric = new SizeAwareMetric(10000, 500, 1000,1000); + SizeAwareMetric metricMain = new SizeAwareMetric(10000, 500, 10, 10); + SizeAwareMetric metric = new SizeAwareMetric(10000, 500, 1000, 1000); metric.setOnSizeCallback(metricMain::addSize); @@ -303,7 +303,7 @@ public void testMaxElementsReleaseNonSizeParentMetric() { @Test public void testMaxElementsReleaseNonSize() { - SizeAwareMetric metric = new SizeAwareMetric(10000, 500, 10,10); + SizeAwareMetric metric = new SizeAwareMetric(10000, 500, 10, 10); AtomicBoolean over = new AtomicBoolean(false); metric.setOverCallback(() -> over.set(true)); diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ServerLocatorImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ServerLocatorImpl.java index 7e8418ca654..efe43bee6d7 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ServerLocatorImpl.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ServerLocatorImpl.java @@ -628,7 +628,7 @@ public ClientSessionFactory createSessionFactory(final TransportConfiguration tr initialize(); - ClientSessionFactoryInternal factory = new ClientSessionFactoryImpl(this, transportConfiguration, config, reconnectAttempts, threadPool, scheduledThreadPool, flowControlThreadPool,incomingInterceptors, outgoingInterceptors); + ClientSessionFactoryInternal factory = new ClientSessionFactoryImpl(this, transportConfiguration, config, reconnectAttempts, threadPool, scheduledThreadPool, flowControlThreadPool, incomingInterceptors, outgoingInterceptors); addToConnecting(factory); try { @@ -1855,7 +1855,7 @@ private synchronized void createConnectors() { connectors = new ArrayList<>(); if (initialConnectors != null) { for (TransportConfiguration initialConnector : initialConnectors) { - ClientSessionFactoryInternal factory = new ClientSessionFactoryImpl(ServerLocatorImpl.this, initialConnector, config, config.reconnectAttempts, threadPool, scheduledThreadPool,flowControlThreadPool, incomingInterceptors, outgoingInterceptors); + ClientSessionFactoryInternal factory = new ClientSessionFactoryImpl(ServerLocatorImpl.this, initialConnector, config, config.reconnectAttempts, threadPool, scheduledThreadPool, flowControlThreadPool, incomingInterceptors, outgoingInterceptors); connectors.add(new Connector(initialConnector, factory)); } diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionQueueQueryResponseMessage_V3.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionQueueQueryResponseMessage_V3.java index 216fa74bb90..ca4880fa42b 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionQueueQueryResponseMessage_V3.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionQueueQueryResponseMessage_V3.java @@ -73,7 +73,7 @@ public SessionQueueQueryResponseMessage_V3(final QueueQueryResult result) { } public SessionQueueQueryResponseMessage_V3() { - this(null, null, false, false, null, 0, 0, false, false, false, false, RoutingType.MULTICAST, -1, null, null,null, null, null, null, null, null, null, null, null, null, null, null, null, null, null); + this(null, null, false, false, null, 0, 0, false, false, false, false, RoutingType.MULTICAST, -1, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null); } private SessionQueueQueryResponseMessage_V3(final SimpleString name, diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/AutoCreateUtil.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/AutoCreateUtil.java index 47564e1012c..c01790c8849 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/AutoCreateUtil.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/AutoCreateUtil.java @@ -52,7 +52,7 @@ public static void autoCreateQueue(ClientSession session, SimpleString destAddr QueueConfiguration queueConfiguration = QueueConfiguration.of(queueName) .setAutoCreated(true) .setAddress(destAddress); - setRequiredQueueConfigurationIfNotSet(queueConfiguration,response, RoutingType.ANYCAST, selectorString, true); + setRequiredQueueConfigurationIfNotSet(queueConfiguration, response, RoutingType.ANYCAST, selectorString, true); session.createQueue(queueConfiguration); logger.debug("The queue {} was created automatically", destAddress); } catch (ActiveMQQueueExistsException e) { diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/aio/AIOSequentialFile.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/aio/AIOSequentialFile.java index 8f1a9d35d93..d7d737d0797 100644 --- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/aio/AIOSequentialFile.java +++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/aio/AIOSequentialFile.java @@ -214,7 +214,7 @@ public void writeDirect(final ByteBuffer bytes, final boolean sync) throws Excep } @Override - public void blockingWriteDirect(ByteBuffer bytes,boolean sync, boolean releaseBuffer) throws Exception { + public void blockingWriteDirect(ByteBuffer bytes, boolean sync, boolean releaseBuffer) throws Exception { logger.trace("Write Direct, Sync: true File: {}", getFileName()); final SimpleWaitIOCallback completion = new SimpleWaitIOCallback(); diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/mapped/TimedSequentialFile.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/mapped/TimedSequentialFile.java index 78ce12f40c8..ab6eee53168 100644 --- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/mapped/TimedSequentialFile.java +++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/mapped/TimedSequentialFile.java @@ -103,7 +103,7 @@ public void delete() throws IOException, InterruptedException, ActiveMQException } @Override - public void blockingWriteDirect(ByteBuffer bytes,boolean sync, boolean releaseBuffer) throws Exception { + public void blockingWriteDirect(ByteBuffer bytes, boolean sync, boolean releaseBuffer) throws Exception { this.sequentialFile.blockingWriteDirect(bytes, sync, releaseBuffer); } diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalImpl.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalImpl.java index cb53dd0aca4..b68155ca19f 100644 --- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalImpl.java +++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalImpl.java @@ -2843,7 +2843,7 @@ public synchronized void start() { if (providedIOThreadPool == null) { ThreadFactory factory = AccessController.doPrivileged((PrivilegedAction) () -> new ActiveMQThreadFactory("ArtemisIOThread", true, JournalImpl.class.getClassLoader())); - threadPool = new ThreadPoolExecutor(0, Integer.MAX_VALUE, 60L,TimeUnit.SECONDS, new SynchronousQueue(), factory); + threadPool = new ThreadPoolExecutor(0, Integer.MAX_VALUE, 60L, TimeUnit.SECONDS, new SynchronousQueue(), factory); ioExecutorFactory = new OrderedExecutorFactory(threadPool); } else { ioExecutorFactory = providedIOThreadPool; diff --git a/artemis-lockmanager/artemis-lockmanager-ri/src/test/java/org/apache/activemq/artemis/lockmanager/zookeeper/CuratorDistributedLockManagerTest.java b/artemis-lockmanager/artemis-lockmanager-ri/src/test/java/org/apache/activemq/artemis/lockmanager/zookeeper/CuratorDistributedLockManagerTest.java index fc40ea70593..1ea1cbbb30d 100644 --- a/artemis-lockmanager/artemis-lockmanager-ri/src/test/java/org/apache/activemq/artemis/lockmanager/zookeeper/CuratorDistributedLockManagerTest.java +++ b/artemis-lockmanager/artemis-lockmanager-ri/src/test/java/org/apache/activemq/artemis/lockmanager/zookeeper/CuratorDistributedLockManagerTest.java @@ -131,7 +131,7 @@ public void verifyLayoutInZK() throws Exception { } private void dumpZK(ZooKeeper zooKeeper, String path, List entries) throws InterruptedException, KeeperException { - List children = ZKPaths.getSortedChildren(zooKeeper,path); + List children = ZKPaths.getSortedChildren(zooKeeper, path); for (String s: children) { if (!s.equals("zookeeper")) { String qualifiedPath = (path.endsWith("/") ? path : path + "/") + s; diff --git a/artemis-protocols/artemis-amqp-protocol/src/test/java/org/apache/activemq/artemis/protocol/amqp/converter/message/JMSTransformationSpeedComparisonTest.java b/artemis-protocols/artemis-amqp-protocol/src/test/java/org/apache/activemq/artemis/protocol/amqp/converter/message/JMSTransformationSpeedComparisonTest.java index 95585c9d536..115e272ad6a 100644 --- a/artemis-protocols/artemis-amqp-protocol/src/test/java/org/apache/activemq/artemis/protocol/amqp/converter/message/JMSTransformationSpeedComparisonTest.java +++ b/artemis-protocols/artemis-amqp-protocol/src/test/java/org/apache/activemq/artemis/protocol/amqp/converter/message/JMSTransformationSpeedComparisonTest.java @@ -67,7 +67,7 @@ public void testBodyOnlyMessage() throws Exception { // Warm up for (int i = 0; i < WARM_CYCLES; ++i) { ICoreMessage intermediate = encoded.toCore(); - encode(AMQPConverter.getInstance().fromCore(intermediate,null)); + encode(AMQPConverter.getInstance().fromCore(intermediate, null)); } long totalDuration = 0; @@ -75,7 +75,7 @@ public void testBodyOnlyMessage() throws Exception { long startTime = System.nanoTime(); for (int i = 0; i < PROFILE_CYCLES; ++i) { ICoreMessage intermediate = encoded.toCore(); - encode(AMQPConverter.getInstance().fromCore(intermediate,null)); + encode(AMQPConverter.getInstance().fromCore(intermediate, null)); } totalDuration += System.nanoTime() - startTime; @@ -97,7 +97,7 @@ public void testMessageWithNoPropertiesOrAnnotations() throws Exception { // Warm up for (int i = 0; i < WARM_CYCLES; ++i) { ICoreMessage intermediate = encoded.toCore(); - encode(AMQPConverter.getInstance().fromCore(intermediate,null)); + encode(AMQPConverter.getInstance().fromCore(intermediate, null)); } long totalDuration = 0; @@ -105,7 +105,7 @@ public void testMessageWithNoPropertiesOrAnnotations() throws Exception { long startTime = System.nanoTime(); for (int i = 0; i < PROFILE_CYCLES; ++i) { ICoreMessage intermediate = encoded.toCore(); - encode(AMQPConverter.getInstance().fromCore(intermediate,null)); + encode(AMQPConverter.getInstance().fromCore(intermediate, null)); } totalDuration += System.nanoTime() - startTime; @@ -119,7 +119,7 @@ public void testTypicalQpidJMSMessage() throws Exception { // Warm up for (int i = 0; i < WARM_CYCLES; ++i) { ICoreMessage intermediate = encoded.toCore(); - encode(AMQPConverter.getInstance().fromCore(intermediate,null)); + encode(AMQPConverter.getInstance().fromCore(intermediate, null)); } long totalDuration = 0; @@ -127,7 +127,7 @@ public void testTypicalQpidJMSMessage() throws Exception { long startTime = System.nanoTime(); for (int i = 0; i < PROFILE_CYCLES; ++i) { ICoreMessage intermediate = encoded.toCore(); - encode(AMQPConverter.getInstance().fromCore(intermediate,null)); + encode(AMQPConverter.getInstance().fromCore(intermediate, null)); } totalDuration += System.nanoTime() - startTime; @@ -142,7 +142,7 @@ public void testComplexQpidJMSMessage() throws Exception { // Warm up for (int i = 0; i < WARM_CYCLES; ++i) { ICoreMessage intermediate = encoded.toCore(); - encode(AMQPConverter.getInstance().fromCore(intermediate,null)); + encode(AMQPConverter.getInstance().fromCore(intermediate, null)); } long totalDuration = 0; @@ -150,7 +150,7 @@ public void testComplexQpidJMSMessage() throws Exception { long startTime = System.nanoTime(); for (int i = 0; i < PROFILE_CYCLES; ++i) { ICoreMessage intermediate = encoded.toCore(); - encode(AMQPConverter.getInstance().fromCore(intermediate,null)); + encode(AMQPConverter.getInstance().fromCore(intermediate, null)); } totalDuration += System.nanoTime() - startTime; @@ -165,7 +165,7 @@ public void testTypicalQpidJMSMessageInBoundOnly() throws Exception { // Warm up for (int i = 0; i < WARM_CYCLES; ++i) { ICoreMessage intermediate = encoded.toCore(); - encode(AMQPConverter.getInstance().fromCore(intermediate,null)); + encode(AMQPConverter.getInstance().fromCore(intermediate, null)); } long totalDuration = 0; @@ -173,7 +173,7 @@ public void testTypicalQpidJMSMessageInBoundOnly() throws Exception { long startTime = System.nanoTime(); for (int i = 0; i < PROFILE_CYCLES; ++i) { ICoreMessage intermediate = encoded.toCore(); - encode(AMQPConverter.getInstance().fromCore(intermediate,null)); + encode(AMQPConverter.getInstance().fromCore(intermediate, null)); } totalDuration += System.nanoTime() - startTime; @@ -188,7 +188,7 @@ public void testTypicalQpidJMSMessageOutBoundOnly() throws Exception { // Warm up for (int i = 0; i < WARM_CYCLES; ++i) { ICoreMessage intermediate = encoded.toCore(); - encode(AMQPConverter.getInstance().fromCore(intermediate,null)); + encode(AMQPConverter.getInstance().fromCore(intermediate, null)); } long totalDuration = 0; @@ -196,7 +196,7 @@ public void testTypicalQpidJMSMessageOutBoundOnly() throws Exception { long startTime = System.nanoTime(); for (int i = 0; i < PROFILE_CYCLES; ++i) { ICoreMessage intermediate = encoded.toCore(); - encode(AMQPConverter.getInstance().fromCore(intermediate,null)); + encode(AMQPConverter.getInstance().fromCore(intermediate, null)); } totalDuration += System.nanoTime() - startTime; diff --git a/artemis-protocols/artemis-openwire-protocol/src/test/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireMessageConverterTest.java b/artemis-protocols/artemis-openwire-protocol/src/test/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireMessageConverterTest.java index 4cb96a104d5..229e1131f70 100644 --- a/artemis-protocols/artemis-openwire-protocol/src/test/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireMessageConverterTest.java +++ b/artemis-protocols/artemis-openwire-protocol/src/test/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireMessageConverterTest.java @@ -55,7 +55,7 @@ public class OpenWireMessageConverterTest { final OpenWireFormatFactory formatFactory = new OpenWireFormatFactory(); final WireFormat openWireFormat = formatFactory.createWireFormat(); - final byte[] content = new byte[] {'a','a'}; + final byte[] content = new byte[] {'a', 'a'}; final String address = "Q"; final ActiveMQDestination destination = new ActiveMQQueue(address); final UUID nodeUUID = UUIDGenerator.getInstance().generateUUID(); diff --git a/artemis-protocols/artemis-openwire-protocol/src/test/java/org/apache/activemq/artemis/core/protocol/openwire/amq/OpenWireConnectionTest.java b/artemis-protocols/artemis-openwire-protocol/src/test/java/org/apache/activemq/artemis/core/protocol/openwire/amq/OpenWireConnectionTest.java index 839b884c4b1..34d129c5f58 100644 --- a/artemis-protocols/artemis-openwire-protocol/src/test/java/org/apache/activemq/artemis/core/protocol/openwire/amq/OpenWireConnectionTest.java +++ b/artemis-protocols/artemis-openwire-protocol/src/test/java/org/apache/activemq/artemis/core/protocol/openwire/amq/OpenWireConnectionTest.java @@ -73,7 +73,7 @@ public void testActorStateVisibility() throws Exception { Mockito.doReturn(serverSession).when(server).createSession(Mockito.anyString(), Mockito.any(), Mockito.any(), Mockito.anyInt(), Mockito.any(), Mockito.anyBoolean(), Mockito.anyBoolean(), Mockito.anyBoolean(), Mockito.anyBoolean(), Mockito.any(), Mockito.any(), Mockito.anyBoolean(), Mockito.any(), Mockito.any(), Mockito.anyString(), Mockito.any(), Mockito.anyBoolean()); - OpenWireProtocolManager openWireProtocolManager = new OpenWireProtocolManager(null, server,null, null); + OpenWireProtocolManager openWireProtocolManager = new OpenWireProtocolManager(null, server, null, null); openWireProtocolManager.setSecurityDomain("securityDomain"); openWireProtocolManager.setSupportAdvisory(false); diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/ConfigurationUtils.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/ConfigurationUtils.java index 05eb177a3a7..a8ff38aa204 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/ConfigurationUtils.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/ConfigurationUtils.java @@ -104,7 +104,7 @@ public static HAPolicy getHAPolicy(HAPolicyConfiguration conf, HAPolicy primaryPolicy; //if null default to colocated if (primaryConfig == null) { - primaryPolicy = new ReplicatedPolicy(server.getNetworkHealthCheck(),ActiveMQDefaultConfiguration.getDefaultQuorumVoteWait()); + primaryPolicy = new ReplicatedPolicy(server.getNetworkHealthCheck(), ActiveMQDefaultConfiguration.getDefaultQuorumVoteWait()); } else { primaryPolicy = getHAPolicy(primaryConfig, server); } @@ -112,7 +112,7 @@ public static HAPolicy getHAPolicy(HAPolicyConfiguration conf, BackupPolicy backupPolicy; if (backupConf == null) { if (primaryPolicy instanceof ReplicatedPolicy) { - backupPolicy = new ReplicaPolicy(server.getNetworkHealthCheck(),ActiveMQDefaultConfiguration.getDefaultQuorumVoteWait()); + backupPolicy = new ReplicaPolicy(server.getNetworkHealthCheck(), ActiveMQDefaultConfiguration.getDefaultQuorumVoteWait()); } else if (primaryPolicy instanceof SharedStorePrimaryPolicy) { backupPolicy = new SharedStoreBackupPolicy(); } else { diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java index 88b77210992..dc369c8df41 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java @@ -971,7 +971,7 @@ protected static String extractPropertyClassName(String property) { return property.substring(0, property.length() - PROPERTY_CLASS_SUFFIX.length()); } - private void trackError(HashMap errors, Map.Entry entry, Throwable oops) { + private void trackError(HashMap errors, Map.Entry entry, Throwable oops) { logger.debug("failed to populate property entry({}), reason: {}", entry, oops); errors.put(entry.toString(), oops.toString()); } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/storage/DatabaseStorageConfiguration.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/storage/DatabaseStorageConfiguration.java index d6a4a63ca3d..dbe0f965225 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/storage/DatabaseStorageConfiguration.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/storage/DatabaseStorageConfiguration.java @@ -247,7 +247,7 @@ public void addDataSourceProperty(String key, String value) { } } - public Map getDataSourceProperties() { + public Map getDataSourceProperties() { return dataSourceProperties; } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java index dc7306d3b14..514f77a1d5a 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java @@ -2194,7 +2194,7 @@ private void parseAMQPBrokerConnections(final Element e, if (nodeType == AMQPBrokerConnectionAddressType.MIRROR) { boolean messageAcks = getBooleanAttribute(e2, "message-acknowledgements", true); - boolean queueCreation = getBooleanAttribute(e2,"queue-creation", true); + boolean queueCreation = getBooleanAttribute(e2, "queue-creation", true); boolean durable = getBooleanAttribute(e2, "durable", true); boolean queueRemoval = getBooleanAttribute(e2, "queue-removal", true); boolean sync = getBooleanAttribute(e2, "sync", false); @@ -2813,7 +2813,7 @@ private FederationDownstreamConfiguration getDownstream(final Element downstream final FederationDownstreamConfiguration downstreamConfiguration = getFederationStream(new FederationDownstreamConfiguration(), downstreamNode, mainConfig); - final String upstreamRef = getString(downstreamNode,"upstream-connector-ref", null, NOT_NULL_OR_EMPTY); + final String upstreamRef = getString(downstreamNode, "upstream-connector-ref", null, NOT_NULL_OR_EMPTY); downstreamConfiguration.setUpstreamConfigurationRef(upstreamRef); return downstreamConfiguration; diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/JDBCJournalStorageManager.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/JDBCJournalStorageManager.java index 65d07112323..d97bd7ff980 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/JDBCJournalStorageManager.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/JDBCJournalStorageManager.java @@ -78,7 +78,7 @@ protected synchronized void init(Configuration config, IOCriticalErrorListener c sqlProviderFactory.create(dbConf.getBindingsTableName(), SQLProvider.DatabaseStoreType.BINDINGS_JOURNAL), scheduledExecutorService, executorFactory.getExecutor(), - criticalErrorListener,dbConf.getJdbcJournalSyncPeriodMillis()); + criticalErrorListener, dbConf.getJdbcJournalSyncPeriodMillis()); messageJournal = new JDBCJournalImpl( connectionProvider, sqlProviderFactory.create(dbConf.getMessageTableName(), SQLProvider.DatabaseStoreType.MESSAGE_JOURNAL), diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/ServerSessionPacketHandler.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/ServerSessionPacketHandler.java index 664328c9f89..1475dd5732f 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/ServerSessionPacketHandler.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/ServerSessionPacketHandler.java @@ -666,7 +666,7 @@ private void slowPacketHandler(final Packet packet) { producers.put(message.getId(), senderName); session.addProducer(senderName, ActiveMQClient.DEFAULT_CORE_PROTOCOL, message.getAddress() != null ? message.getAddress().toString() : null); } else { - ActiveMQServerLogger.LOGGER.producerAlreadyExists(message.getId(),session.getName(), remotingConnection.getRemoteAddress()); + ActiveMQServerLogger.LOGGER.producerAlreadyExists(message.getId(), session.getName(), remotingConnection.getRemoteAddress()); } break; } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/Queue.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/Queue.java index 1af9a0371e0..8df1f0d5cb3 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/Queue.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/Queue.java @@ -40,7 +40,7 @@ import org.apache.activemq.artemis.utils.collections.NodeStoreFactory; import org.apache.activemq.artemis.utils.critical.CriticalComponent; -public interface Queue extends Bindable,CriticalComponent { +public interface Queue extends Bindable, CriticalComponent { int MAX_CONSUMERS_UNLIMITED = -1; diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionImpl.java index 2f8b7b72a0e..19feeec6efe 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionImpl.java @@ -932,7 +932,7 @@ private void createNewRecord(final long eventUID, bridge.start(); } - if ( !ConfigurationImpl.checkoutDupCacheSize(serverLocator.getConfirmationWindowSize(),server.getConfiguration().getIDCacheSize())) { + if ( !ConfigurationImpl.checkoutDupCacheSize(serverLocator.getConfirmationWindowSize(), server.getConfiguration().getIDCacheSize())) { ActiveMQServerLogger.LOGGER.duplicateCacheSizeWarning(server.getConfiguration().getIDCacheSize(), serverLocator.getConfirmationWindowSize()); } } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java index eeaf45b258b..287db949c36 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java @@ -1162,7 +1162,7 @@ public QueueQueryResult queueQuery(SimpleString name) { response = new QueueQueryResult(realName, binding.getAddress(), queue.isDurable(), queue.isTemporary(), filterString, queue.getConsumerCount(), queue.getMessageCount(), autoCreateQueues, true, queue.isAutoCreated(), queue.isPurgeOnNoConsumers(), queue.getRoutingType(), queue.getMaxConsumers(), queue.isExclusive(), queue.isGroupRebalance(), queue.isGroupRebalancePauseDispatch(), queue.getGroupBuckets(), queue.getGroupFirstKey(), queue.isLastValue(), queue.getLastValueKey(), queue.isNonDestructive(), queue.getConsumersBeforeDispatch(), queue.getDelayBeforeDispatch(), queue.isAutoDelete(), queue.getAutoDeleteDelay(), queue.getAutoDeleteMessageCount(), defaultConsumerWindowSize, queue.getRingSize(), queue.isEnabled(), queue.isConfigurationManaged()); } else if (realName.equals(managementAddress)) { // make an exception for the management address (see HORNETQ-29) - response = new QueueQueryResult(realName, managementAddress, true, false, null, -1, -1, autoCreateQueues, true, false, false, RoutingType.MULTICAST, -1, false, false, false, null, null, null,null, null, null, null, null, null, null, defaultConsumerWindowSize, null, null, null); + response = new QueueQueryResult(realName, managementAddress, true, false, null, -1, -1, autoCreateQueues, true, false, false, RoutingType.MULTICAST, -1, false, false, false, null, null, null, null, null, null, null, null, null, null, defaultConsumerWindowSize, null, null, null); } else { response = new QueueQueryResult(realName, addressName, true, false, null, 0, 0, autoCreateQueues, false, false, defaultPurgeOnNoConsumers, RoutingType.MULTICAST, defaultMaxConsumers, defaultExclusiveQueue, defaultGroupRebalance, defaultGroupRebalancePauseDispatch, defaultGroupBuckets, defaultGroupFirstKey, defaultLastValueQueue, defaultLastValueKey, defaultNonDestructive, defaultConsumersBeforeDispatch, defaultDelayBeforeDispatch, isAutoDelete(false, addressSettings), autoDeleteQueuesDelay, autoDeleteQueuesMessageCount, defaultConsumerWindowSize, defaultRingSize, defaultEnabled, false); } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueFactoryImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueFactoryImpl.java index 4464fefdf89..651ca88f9c9 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueFactoryImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueFactoryImpl.java @@ -120,7 +120,7 @@ public Queue createQueue(final long persistenceID, Queue queue; if (lastValueKey(addressSettings) != null) { - queue = new LastValueQueue(persistenceID, address, name, filter, pageSubscription == null ? null : pageSubscription.getPagingStore(), pageSubscription, user, durable, temporary, autoCreated, ActiveMQDefaultConfiguration.getDefaultRoutingType(), ActiveMQDefaultConfiguration.getDefaultMaxQueueConsumers(), ActiveMQDefaultConfiguration.getDefaultExclusive(), ActiveMQDefaultConfiguration.getDefaultGroupRebalance(), ActiveMQDefaultConfiguration.getDefaultGroupBuckets(), ActiveMQDefaultConfiguration.getDefaultGroupFirstKey(), ActiveMQDefaultConfiguration.getDefaultConsumersBeforeDispatch(), ActiveMQDefaultConfiguration.getDefaultDelayBeforeDispatch(), ActiveMQDefaultConfiguration.getDefaultPurgeOnNoConsumers(), lastValueKey(addressSettings), ActiveMQDefaultConfiguration.getDefaultNonDestructive(), ActiveMQDefaultConfiguration.getDefaultQueueAutoDelete(autoCreated), ActiveMQDefaultConfiguration.getDefaultQueueAutoDeleteDelay(), ActiveMQDefaultConfiguration.getDefaultQueueAutoDeleteMessageCount(),false, scheduledExecutor, postOffice, storageManager, addressSettingsRepository, executorFactory.getExecutor(), server, this); + queue = new LastValueQueue(persistenceID, address, name, filter, pageSubscription == null ? null : pageSubscription.getPagingStore(), pageSubscription, user, durable, temporary, autoCreated, ActiveMQDefaultConfiguration.getDefaultRoutingType(), ActiveMQDefaultConfiguration.getDefaultMaxQueueConsumers(), ActiveMQDefaultConfiguration.getDefaultExclusive(), ActiveMQDefaultConfiguration.getDefaultGroupRebalance(), ActiveMQDefaultConfiguration.getDefaultGroupBuckets(), ActiveMQDefaultConfiguration.getDefaultGroupFirstKey(), ActiveMQDefaultConfiguration.getDefaultConsumersBeforeDispatch(), ActiveMQDefaultConfiguration.getDefaultDelayBeforeDispatch(), ActiveMQDefaultConfiguration.getDefaultPurgeOnNoConsumers(), lastValueKey(addressSettings), ActiveMQDefaultConfiguration.getDefaultNonDestructive(), ActiveMQDefaultConfiguration.getDefaultQueueAutoDelete(autoCreated), ActiveMQDefaultConfiguration.getDefaultQueueAutoDeleteDelay(), ActiveMQDefaultConfiguration.getDefaultQueueAutoDeleteMessageCount(), false, scheduledExecutor, postOffice, storageManager, addressSettingsRepository, executorFactory.getExecutor(), server, this); } else { queue = new QueueImpl(persistenceID, address, name, filter, pageSubscription == null ? null : pageSubscription.getPagingStore(), pageSubscription, user, durable, temporary, autoCreated, scheduledExecutor, postOffice, storageManager, addressSettingsRepository, executorFactory.getExecutor(), server, this); } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java index 8f4249b16b9..73520a7befd 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java @@ -1512,7 +1512,7 @@ public void addConsumer(final Consumer consumer) throws Exception { ConsumerHolder newConsumerHolder = new ConsumerHolder<>(consumer, this); if (consumers.add(newConsumerHolder)) { if (delayBeforeDispatch >= 0) { - dispatchStartTimeUpdater.compareAndSet(this,-1, delayBeforeDispatch + System.currentTimeMillis()); + dispatchStartTimeUpdater.compareAndSet(this, -1, delayBeforeDispatch + System.currentTimeMillis()); } refCountForConsumers.increment(); } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java index b1b65118330..f9c447dbe7f 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java @@ -1882,7 +1882,7 @@ public AutoCreateResult checkAutoCreate(final QueueConfiguration queueConfig) th @Override public RoutingStatus send(final Message message, final boolean direct, final String senderName) throws Exception { - return send(message, direct, senderName,false); + return send(message, direct, senderName, false); } @Override diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/management/JMXAccessControlList.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/management/JMXAccessControlList.java index d949eb9c87c..9152a4a41ff 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/management/JMXAccessControlList.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/management/JMXAccessControlList.java @@ -120,7 +120,7 @@ public void addToDefaultAccess(String method, String... roles) { } } - public void addToRoleAccess(String domain,String key, String method, String... roles) { + public void addToRoleAccess(String domain, String key, String method, String... roles) { TreeMap domainMap = new TreeMap<>(keyComparator); domainMap = domainAccess.putIfAbsent(domain, domainMap); if (domainMap == null) { diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/transformer/AddHeadersTransformer.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/transformer/AddHeadersTransformer.java index be4c5cea9d6..63a7b0676e9 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/transformer/AddHeadersTransformer.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/transformer/AddHeadersTransformer.java @@ -28,7 +28,7 @@ public class AddHeadersTransformer implements Transformer { @Override public void init(Map properties) { - properties.forEach((k,v) -> headers.put(SimpleString.of(k), SimpleString.of(v))); + properties.forEach((k, v) -> headers.put(SimpleString.of(k), SimpleString.of(v))); } @Override diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/impl/TransactionImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/impl/TransactionImpl.java index aaf1b2dbfb2..8122d122ab8 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/impl/TransactionImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/impl/TransactionImpl.java @@ -103,7 +103,7 @@ public TransactionImpl(final StorageManager storageManager, final int timeoutSec } public TransactionImpl(final StorageManager storageManager) { - this(storageManager.generateID(), null, storageManager,-1); + this(storageManager.generateID(), null, storageManager, -1); } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/scram/StringPrep.java b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/scram/StringPrep.java index 8c7375216eb..789319d7140 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/scram/StringPrep.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/scram/StringPrep.java @@ -927,7 +927,7 @@ public boolean isCharInClass(int c) { 0xE0002, 0xE001F, 0xE0080, - 0xEFFFD,}); + 0xEFFFD}); /** B.1 Commonly mapped to nothing */ static final CharClass B1 = CharClass.fromList(new int[] {0x00AD, @@ -956,7 +956,7 @@ public boolean isCharInClass(int c) { 0xFE0D, 0xFE0E, 0xFE0F, - 0xFEFF,}); + 0xFEFF}); /** C.1.1 ASCII space characters */ static final CharClass C11 = CharClass.fromList(new int[] {0x0020}); @@ -978,7 +978,7 @@ public boolean isCharInClass(int c) { 0x200B, 0x202F, 0x205F, - 0x3000,}); + 0x3000}); /** C.2.1 ASCII control characters */ static final CharClass C21 = CharClass.fromList(new int[] {0x0000, @@ -1077,10 +1077,10 @@ public boolean isCharInClass(int c) { 0x1D177, 0x1D178, 0x1D179, - 0x1D17A,}); + 0x1D17A}); /** C.3 Private use */ - static final CharClass C3 = CharClass.fromRanges(new int[] {0xE000, 0xF8FF, 0xF0000, 0xFFFFD, 0x100000, 0x10FFFD,}); + static final CharClass C3 = CharClass.fromRanges(new int[] {0xE000, 0xF8FF, 0xF0000, 0xFFFFD, 0x100000, 0x10FFFD}); /** C.4 Non-character code points */ static final CharClass C4 = CharClass.fromRanges(new int[] {0xFDD0, @@ -1118,13 +1118,13 @@ public boolean isCharInClass(int c) { 0xFFFFE, 0xFFFFF, 0x10FFFE, - 0x10FFFF,}); + 0x10FFFF}); /** C.5 Surrogate codes */ - static final CharClass C5 = CharClass.fromRanges(new int[] {0xD800, 0xDFFF,}); + static final CharClass C5 = CharClass.fromRanges(new int[] {0xD800, 0xDFFF}); /** C.6 Inappropriate for plain text */ - static final CharClass C6 = CharClass.fromList(new int[] {0xFFF9, 0xFFFA, 0xFFFB, 0xFFFC, 0xFFFD,}); + static final CharClass C6 = CharClass.fromList(new int[] {0xFFF9, 0xFFFA, 0xFFFB, 0xFFFC, 0xFFFD}); /** C.7 Inappropriate for canonical representation */ static final CharClass C7 = CharClass.fromList(new int[] {0x2FF0, @@ -1138,7 +1138,7 @@ public boolean isCharInClass(int c) { 0x2FF8, 0x2FF9, 0x2FFA, - 0x2FFB,}); + 0x2FFB}); /** C.8 Change display properties or are deprecated */ static final CharClass C8 = CharClass.fromList(new int[] {0x0340, @@ -1155,10 +1155,10 @@ public boolean isCharInClass(int c) { 0x206C, 0x206D, 0x206E, - 0x206F,}); + 0x206F}); /** C.9 Tagging characters (tuples) */ - static final CharClass C9 = CharClass.fromRanges(new int[] {0xE0001, 0xE0001, 0xE0020, 0xE007F,}); + static final CharClass C9 = CharClass.fromRanges(new int[] {0xE0001, 0xE0001, 0xE0020, 0xE007F}); /** D.1 Characters with bidirectional property "R" or "AL" */ static final CharClass D1 = CharClass.fromRanges(new int[] {0x05BE, @@ -1228,7 +1228,7 @@ public boolean isCharInClass(int c) { 0xFE70, 0xFE74, 0xFE76, - 0xFEFC,}); + 0xFEFC}); /** D.2 Characters with bidirectional property "L" */ static final CharClass D2 = CharClass.fromRanges(new int[] {0x0041, @@ -1950,7 +1950,7 @@ public boolean isCharInClass(int c) { 0xF0000, 0xFFFFD, 0x100000, - 0x10FFFD,}); + 0x10FFFD}); /** rfc4013 2.3. Prohibited Output */ static final CharClass saslProhibited = CharClass.fromClasses(C12, C21, C22, C3, C4, C5, C6, C7, C8, C9); 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 7252e937ea4..52e68ea6279 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 @@ -389,7 +389,7 @@ private void testAMQPConnectionsConfiguration(boolean sync) throws Throwable { assertEquals("admin", connectConfiguration.getUser()); assertEquals("password", connectConfiguration.getPassword()); assertFalse(connectConfiguration.isAutostart()); - assertEquals(1,connectConfiguration.getConnectionElements().size()); + assertEquals(1, connectConfiguration.getConnectionElements().size()); AMQPBrokerConnectionElement amqpBrokerConnectionElement = connectConfiguration.getConnectionElements().get(0); assertTrue(amqpBrokerConnectionElement instanceof AMQPMirrorBrokerConnectionElement); AMQPMirrorBrokerConnectionElement amqpMirrorBrokerConnectionElement = (AMQPMirrorBrokerConnectionElement) amqpBrokerConnectionElement; @@ -451,7 +451,7 @@ private void doTestAMQPFederationAddressPolicyConfiguration(boolean local) throw assertEquals("admin", connectConfiguration.getUser()); assertEquals("password", connectConfiguration.getPassword()); assertFalse(connectConfiguration.isAutostart()); - assertEquals(1,connectConfiguration.getFederations().size()); + assertEquals(1, connectConfiguration.getFederations().size()); AMQPBrokerConnectionElement amqpBrokerConnectionElement = connectConfiguration.getConnectionElements().get(0); assertTrue(amqpBrokerConnectionElement instanceof AMQPFederatedBrokerConnectionElement); AMQPFederatedBrokerConnectionElement amqpFederationBrokerConnectionElement = (AMQPFederatedBrokerConnectionElement) amqpBrokerConnectionElement; @@ -576,7 +576,7 @@ private void doTestAMQPFederationQueuePolicyConfiguration(boolean local) throws assertEquals("admin", connectConfiguration.getUser()); assertEquals("password", connectConfiguration.getPassword()); assertFalse(connectConfiguration.isAutostart()); - assertEquals(1,connectConfiguration.getFederations().size()); + assertEquals(1, connectConfiguration.getFederations().size()); AMQPBrokerConnectionElement amqpBrokerConnectionElement = connectConfiguration.getConnectionElements().get(0); assertTrue(amqpBrokerConnectionElement instanceof AMQPFederatedBrokerConnectionElement); AMQPFederatedBrokerConnectionElement amqpFederationBrokerConnectionElement = (AMQPFederatedBrokerConnectionElement) amqpBrokerConnectionElement; @@ -662,7 +662,7 @@ public void testAMQPConnectionsConfigurationUriEnc() throws Throwable { Properties insertionOrderedProperties = new ConfigurationImpl.InsertionOrderedProperties(); insertionOrderedProperties.put("AMQPConnections.target.uri", "tcp://amq-dc1-tls-amqp-${STATEFUL_SET_ORDINAL}-svc.dc1.svc.cluster.local:5673?clientFailureCheckPeriod=30000&connectionTTL=60000&sslEnabled=true&verifyHost=false&trustStorePath=/remote-cluster-truststore/client.ts"); - insertionOrderedProperties.put("AMQPConnections.target.transportConfigurations.target.params.trustStorePassword","ENC(2a7c211d21c295cdbcde3589c205decb)"); + insertionOrderedProperties.put("AMQPConnections.target.transportConfigurations.target.params.trustStorePassword", "ENC(2a7c211d21c295cdbcde3589c205decb)"); configuration.parsePrefixedProperties(insertionOrderedProperties, null); AMQPBrokerConnectConfiguration connectConfiguration = configuration.getAMQPConnections().get(0); @@ -689,7 +689,7 @@ public void testCoreBridgeConfiguration() throws Throwable { properties.put("bridgeConfigurations.b1.transformerConfiguration.className", AddHeadersTransformer.class.getName()); properties.put("bridgeConfigurations.b1.transformerConfiguration.properties", "header1=a,header2=b"); - properties.put("bridgeConfigurations.b1.transformerConfiguration.properties.header3","c"); + properties.put("bridgeConfigurations.b1.transformerConfiguration.properties.header3", "c"); configuration.parsePrefixedProperties(properties, null); assertTrue(configuration.getStatus().contains("\"errors\":[]")); @@ -2370,7 +2370,7 @@ public void testMetricsPluginInit() throws Exception { final ConfigurationImpl configuration = new ConfigurationImpl(); Properties insertionOrderedProperties = new ConfigurationImpl.InsertionOrderedProperties(); - insertionOrderedProperties.put("metricsConfiguration.plugin","org.apache.activemq.artemis.core.config.impl.FileConfigurationTest.FakeMetricPlugin.class"); + insertionOrderedProperties.put("metricsConfiguration.plugin", "org.apache.activemq.artemis.core.config.impl.FileConfigurationTest.FakeMetricPlugin.class"); configuration.parsePrefixedProperties(insertionOrderedProperties, null); assertFalse(configuration.getStatus().contains("\"errors\":[]"), configuration.getStatus()); @@ -2378,8 +2378,8 @@ public void testMetricsPluginInit() throws Exception { assertTrue(configuration.getStatus().contains("FakeMetricPlugin")); // fix the typo error - insertionOrderedProperties.put("metricsConfiguration.plugin","org.apache.activemq.artemis.core.config.impl.FileConfigurationTest$FakeMetricPlugin.class"); - insertionOrderedProperties.put("metricsConfiguration.plugin.init",""); + insertionOrderedProperties.put("metricsConfiguration.plugin", "org.apache.activemq.artemis.core.config.impl.FileConfigurationTest$FakeMetricPlugin.class"); + insertionOrderedProperties.put("metricsConfiguration.plugin.init", ""); insertionOrderedProperties.put("metricsConfiguration.jvmMemory", "false"); configuration.parsePrefixedProperties(insertionOrderedProperties, null); diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionImplMockTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionImplMockTest.java index 4730aa140e4..c0a5cce6680 100644 --- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionImplMockTest.java +++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionImplMockTest.java @@ -75,7 +75,7 @@ public void testRemvalOfLocalParameters() throws Exception { null, //final MessageLoadBalancingType messageLoadBalancingType, 0, //final int confirmationWindowSize, 0, //final int producerWindowSize, - () -> executor,//final ExecutorFactory executorFactory, + () -> executor, //final ExecutorFactory executorFactory, new MockServer(), //final ActiveMQServer server, null, //final PostOffice postOffice, null, //final ManagementService managementService, diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/impl/BackupActivationNoReconnectTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/impl/BackupActivationNoReconnectTest.java index 456273a2e78..c8778f71e43 100644 --- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/impl/BackupActivationNoReconnectTest.java +++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/impl/BackupActivationNoReconnectTest.java @@ -168,7 +168,7 @@ protected void verifySingleAttemptToLocatePrimary(ActiveMQServerImpl server, Act Map urlParams = new HashMap<>(); urlParams.put("port", serverSocket.getLocalPort()); when(connectorConfig.getCombinedParams()).thenReturn(urlParams); - ClientSessionFactoryImpl sessionFactory = new ClientSessionFactoryImpl(serverLocator, connectorConfig, locatorConfig, reconnectAttempts, threadPool, scheduledThreadPool, flowControlThreadPool,null, null); + ClientSessionFactoryImpl sessionFactory = new ClientSessionFactoryImpl(serverLocator, connectorConfig, locatorConfig, reconnectAttempts, threadPool, scheduledThreadPool, flowControlThreadPool, null, null); when(clusterControl.getSessionFactory()).thenReturn(sessionFactory); when(clientProtocolManager.isAlive()).thenReturn(true); diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/management/JMXAccessControlListTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/management/JMXAccessControlListTest.java index bec49aaf68f..da71ea5d20c 100644 --- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/management/JMXAccessControlListTest.java +++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/management/JMXAccessControlListTest.java @@ -92,7 +92,7 @@ public void testWildcardDomainWithProperty() throws MalformedObjectNameException @Test public void testBasicRole() throws MalformedObjectNameException { JMXAccessControlList controlList = new JMXAccessControlList(); - controlList.addToRoleAccess("org.myDomain", null,"listSomething", "admin"); + controlList.addToRoleAccess("org.myDomain", null, "listSomething", "admin"); List roles = controlList.getRolesForObject(new ObjectName("org.myDomain:*"), "listSomething"); assertArrayEquals(roles.toArray(), new String[]{"admin"}); } @@ -100,8 +100,8 @@ public void testBasicRole() throws MalformedObjectNameException { @Test public void testBasicRoleWithKey() throws MalformedObjectNameException { JMXAccessControlList controlList = new JMXAccessControlList(); - controlList.addToRoleAccess("org.myDomain", "type=foo","listSomething", "admin"); - controlList.addToRoleAccess("org.myDomain", null,"listSomething", "view"); + controlList.addToRoleAccess("org.myDomain", "type=foo", "listSomething", "admin"); + controlList.addToRoleAccess("org.myDomain", null, "listSomething", "view"); List roles = controlList.getRolesForObject(new ObjectName("org.myDomain:type=foo"), "listSomething"); assertArrayEquals(roles.toArray(), new String[]{"admin"}); } @@ -109,8 +109,8 @@ public void testBasicRoleWithKey() throws MalformedObjectNameException { @Test public void testBasicRoleWithKeyContainingQuotes() throws MalformedObjectNameException { JMXAccessControlList controlList = new JMXAccessControlList(); - controlList.addToRoleAccess("org.myDomain", "type=foo","listSomething", "admin"); - controlList.addToRoleAccess("org.myDomain", null,"listSomething", "view"); + controlList.addToRoleAccess("org.myDomain", "type=foo", "listSomething", "admin"); + controlList.addToRoleAccess("org.myDomain", null, "listSomething", "view"); List roles = controlList.getRolesForObject(new ObjectName("org.myDomain:type=\"foo\""), "listSomething"); assertArrayEquals(roles.toArray(), new String[]{"admin"}); } @@ -118,8 +118,8 @@ public void testBasicRoleWithKeyContainingQuotes() throws MalformedObjectNameExc @Test public void testBasicRoleWithWildcardKey() throws MalformedObjectNameException { JMXAccessControlList controlList = new JMXAccessControlList(); - controlList.addToRoleAccess("org.myDomain", "type=*","listSomething", "admin"); - controlList.addToRoleAccess("org.myDomain", null,"listSomething", "view"); + controlList.addToRoleAccess("org.myDomain", "type=*", "listSomething", "admin"); + controlList.addToRoleAccess("org.myDomain", null, "listSomething", "view"); List roles = controlList.getRolesForObject(new ObjectName("org.myDomain:type=foo"), "listSomething"); assertArrayEquals(roles.toArray(), new String[]{"admin"}); } @@ -127,10 +127,10 @@ public void testBasicRoleWithWildcardKey() throws MalformedObjectNameException { @Test public void testBasicRoleWithWildcardInKey() throws MalformedObjectNameException { JMXAccessControlList controlList = new JMXAccessControlList(); - controlList.addToRoleAccess("org.myDomain", "type=foo*","listSomething", "update"); - controlList.addToRoleAccess("org.myDomain", "type=bar*","listSomething", "browse"); - controlList.addToRoleAccess("org.myDomain", "type=foo.bar*","listSomething", "admin"); - controlList.addToRoleAccess("org.myDomain", null,"listSomething", "view"); + controlList.addToRoleAccess("org.myDomain", "type=foo*", "listSomething", "update"); + controlList.addToRoleAccess("org.myDomain", "type=bar*", "listSomething", "browse"); + controlList.addToRoleAccess("org.myDomain", "type=foo.bar*", "listSomething", "admin"); + controlList.addToRoleAccess("org.myDomain", null, "listSomething", "view"); assertArrayEquals(controlList.getRolesForObject(new ObjectName("org.myDomain:type=foo.bar.test"), "listSomething").toArray(), new String[]{"admin"}); assertArrayEquals(controlList.getRolesForObject(new ObjectName("org.myDomain:type=bar.test"), @@ -148,7 +148,7 @@ public void testMutipleBasicRoles() throws MalformedObjectNameException { @Test public void testBasicRoleWithPrefix() throws MalformedObjectNameException { JMXAccessControlList controlList = new JMXAccessControlList(); - controlList.addToRoleAccess("org.myDomain", null,"list*", "admin"); + controlList.addToRoleAccess("org.myDomain", null, "list*", "admin"); List roles = controlList.getRolesForObject(new ObjectName("org.myDomain:*"), "listSomething"); assertArrayEquals(roles.toArray(), new String[]{"admin"}); } @@ -156,8 +156,8 @@ public void testBasicRoleWithPrefix() throws MalformedObjectNameException { @Test public void testBasicRoleWithBoth() throws MalformedObjectNameException { JMXAccessControlList controlList = new JMXAccessControlList(); - controlList.addToRoleAccess("org.myDomain", null,"listSomething", "admin"); - controlList.addToRoleAccess("org.myDomain", null,"list*", "view"); + controlList.addToRoleAccess("org.myDomain", null, "listSomething", "admin"); + controlList.addToRoleAccess("org.myDomain", null, "list*", "view"); List roles = controlList.getRolesForObject(new ObjectName("org.myDomain:*"), "listSomething"); assertArrayEquals(roles.toArray(), new String[]{"admin"}); roles = controlList.getRolesForObject(new ObjectName("org.myDomain:*"), "listSomethingMore"); @@ -167,8 +167,8 @@ public void testBasicRoleWithBoth() throws MalformedObjectNameException { @Test public void testBasicRoleWithDefaultsPrefix() throws MalformedObjectNameException { JMXAccessControlList controlList = new JMXAccessControlList(); - controlList.addToDefaultAccess("setSomething","admin"); - controlList.addToRoleAccess("org.myDomain", null,"list*", "view"); + controlList.addToDefaultAccess("setSomething", "admin"); + controlList.addToRoleAccess("org.myDomain", null, "list*", "view"); List roles = controlList.getRolesForObject(new ObjectName("org.myDomain.foo:*"), "setSomething"); assertArrayEquals(roles.toArray(), new String[]{"admin"}); } @@ -176,9 +176,9 @@ public void testBasicRoleWithDefaultsPrefix() throws MalformedObjectNameExceptio @Test public void testBasicRoleWithDefaultsWildcardPrefix() throws MalformedObjectNameException { JMXAccessControlList controlList = new JMXAccessControlList(); - controlList.addToDefaultAccess("setSomething","admin"); - controlList.addToDefaultAccess("set*","admin"); - controlList.addToRoleAccess("org.myDomain", null,"list*", "view"); + controlList.addToDefaultAccess("setSomething", "admin"); + controlList.addToDefaultAccess("set*", "admin"); + controlList.addToRoleAccess("org.myDomain", null, "list*", "view"); List roles = controlList.getRolesForObject(new ObjectName("org.myDomain.foo:*"), "setSomethingMore"); assertArrayEquals(roles.toArray(), new String[]{"admin"}); } @@ -186,9 +186,9 @@ public void testBasicRoleWithDefaultsWildcardPrefix() throws MalformedObjectName @Test public void testBasicRoleWithDefaultscatchAllPrefix() throws MalformedObjectNameException { JMXAccessControlList controlList = new JMXAccessControlList(); - controlList.addToDefaultAccess("setSomething","admin"); - controlList.addToDefaultAccess("*","admin"); - controlList.addToRoleAccess("org.myDomain", null,"list*", "view"); + controlList.addToDefaultAccess("setSomething", "admin"); + controlList.addToDefaultAccess("*", "admin"); + controlList.addToRoleAccess("org.myDomain", null, "list*", "view"); List roles = controlList.getRolesForObject(new ObjectName("org.myDomain.foo:*"), "setSomethingMore"); assertArrayEquals(roles.toArray(), new String[]{"admin"}); } @@ -196,11 +196,11 @@ public void testBasicRoleWithDefaultscatchAllPrefix() throws MalformedObjectName @Test public void testKeylessDomain() throws MalformedObjectNameException { JMXAccessControlList controlList = new JMXAccessControlList(); - controlList.addToRoleAccess("org.myDomain.foo", null,"list*", "amq","monitor"); - controlList.addToRoleAccess("org.myDomain.foo", null,"get*", "amq","monitor"); - controlList.addToRoleAccess("org.myDomain.foo", null,"is*", "amq","monitor"); - controlList.addToRoleAccess("org.myDomain.foo", null,"set*", "amq"); - controlList.addToRoleAccess("org.myDomain.foo", null,"*", "amq"); + controlList.addToRoleAccess("org.myDomain.foo", null, "list*", "amq", "monitor"); + controlList.addToRoleAccess("org.myDomain.foo", null, "get*", "amq", "monitor"); + controlList.addToRoleAccess("org.myDomain.foo", null, "is*", "amq", "monitor"); + controlList.addToRoleAccess("org.myDomain.foo", null, "set*", "amq"); + controlList.addToRoleAccess("org.myDomain.foo", null, "*", "amq"); List roles = controlList.getRolesForObject(new ObjectName("org.myDomain.foo:foo=bar"), "listFoo"); assertNotNull(roles); diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/settings/RepositoryTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/settings/RepositoryTest.java index bca8cec81e5..4681b3d5c1c 100644 --- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/settings/RepositoryTest.java +++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/settings/RepositoryTest.java @@ -417,7 +417,7 @@ public void testAddressSettingsMergeIdempotence() { static class DummyMergeable implements Mergeable { private final int id; - private final Map settings; + private final Map settings; private final List mergedItems; public int getId() { @@ -438,7 +438,7 @@ public List getMergedItems() { this.mergedItems = new ArrayList<>(); } - DummyMergeable(final int id, final Map settings) { + DummyMergeable(final int id, final Map settings) { this.id = id; this.settings = settings; this.mergedItems = new ArrayList<>(); diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/spi/core/security/jaas/KubernetesLoginModuleTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/spi/core/security/jaas/KubernetesLoginModuleTest.java index 0e1cdfa7943..d2c20565a36 100644 --- a/artemis-server/src/test/java/org/apache/activemq/artemis/spi/core/security/jaas/KubernetesLoginModuleTest.java +++ b/artemis-server/src/test/java/org/apache/activemq/artemis/spi/core/security/jaas/KubernetesLoginModuleTest.java @@ -201,6 +201,6 @@ public void testIgnoreRolesFromReview() throws LoginException { private Map getDefaultOptions() { String baseDirValue = new File(KubernetesLoginModuleTest.class.getClassLoader().getResource("k8s-roles.properties").getPath()).getParentFile().getAbsolutePath(); - return Map.of(K8S_ROLE_FILE_PROP_NAME, "k8s-roles.properties", "baseDir",baseDirValue); + return Map.of(K8S_ROLE_FILE_PROP_NAME, "k8s-roles.properties", "baseDir", baseDirValue); } } diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/spi/core/security/jaas/PrincipalConversionLoginModuleTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/spi/core/security/jaas/PrincipalConversionLoginModuleTest.java index bf87321472b..ffee07740bc 100644 --- a/artemis-server/src/test/java/org/apache/activemq/artemis/spi/core/security/jaas/PrincipalConversionLoginModuleTest.java +++ b/artemis-server/src/test/java/org/apache/activemq/artemis/spi/core/security/jaas/PrincipalConversionLoginModuleTest.java @@ -33,7 +33,7 @@ public void loginOk() throws Exception { PrincipalConversionLoginModule underTest = new PrincipalConversionLoginModule(); final Subject subject = new Subject(); - underTest.initialize(subject,null, null, new HashMap<>()); + underTest.initialize(subject, null, null, new HashMap<>()); assertTrue(underTest.login()); assertFalse(underTest.commit()); @@ -44,7 +44,7 @@ public void loginOk() throws Exception { public void loginOkOnNullSubject() throws Exception { PrincipalConversionLoginModule underTest = new PrincipalConversionLoginModule(); - underTest.initialize(null,null, null, new HashMap<>()); + underTest.initialize(null, null, null, new HashMap<>()); assertTrue(underTest.login()); assertFalse(underTest.commit()); diff --git a/etc/checkstyle.xml b/etc/checkstyle.xml index fa90de4608b..2e93f77d522 100644 --- a/etc/checkstyle.xml +++ b/etc/checkstyle.xml @@ -79,6 +79,9 @@ under the License. + + + diff --git a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/Mesh2Test.java b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/Mesh2Test.java index cc4571686ff..d1416f004c4 100644 --- a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/Mesh2Test.java +++ b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/Mesh2Test.java @@ -72,7 +72,7 @@ public void testSendReceiveTopicShared() throws Throwable { t.start(); assertTrue(latch.await(10, TimeUnit.SECONDS)); - evaluate(senderClassloader,"meshTest/sendMessages.groovy", server, sender, "sendTopic"); + evaluate(senderClassloader, "meshTest/sendMessages.groovy", server, sender, "sendTopic"); t.join(); diff --git a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/MeshTest.java b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/MeshTest.java index 692af37b58c..634d957c53a 100644 --- a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/MeshTest.java +++ b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/MeshTest.java @@ -95,7 +95,7 @@ public void testSendReceiveTopicNonDurable() throws Throwable { t.start(); assertTrue(latch.await(10, TimeUnit.SECONDS)); - evaluate(senderClassloader,"meshTest/sendMessages.groovy", server, sender, "sendTopic"); + evaluate(senderClassloader, "meshTest/sendMessages.groovy", server, sender, "sendTopic"); t.join(); diff --git a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/distribution/RollingUpgradeTest.java b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/distribution/RollingUpgradeTest.java index b97e9856e6e..3616028db7c 100644 --- a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/distribution/RollingUpgradeTest.java +++ b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/distribution/RollingUpgradeTest.java @@ -283,7 +283,7 @@ private void testRollUpgrade(File artemisHome, File upgradingArtemisHome) throws private void sendMessage(String uri, String protocol) throws Exception { ConnectionFactory cf = CFUtil.createConnectionFactory(protocol, uri); try (Connection connection = cf.createConnection(); - Session session = connection.createSession(false,Session.AUTO_ACKNOWLEDGE)) { + Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE)) { MessageProducer producer = session.createProducer(session.createQueue(QUEUE_NAME)); TextMessage message = session.createTextMessage("hello from protocol " + protocol); message.setStringProperty("protocolUsed", protocol); @@ -296,7 +296,7 @@ private void sendMessage(String uri, String protocol) throws Exception { private void consumeMessage(String uri, String protocol) throws Exception { ConnectionFactory cf = CFUtil.createConnectionFactory(protocol, uri); try (Connection connection = cf.createConnection(); - Session session = connection.createSession(false,Session.AUTO_ACKNOWLEDGE)) { + Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE)) { MessageConsumer consumer = session.createConsumer(session.createQueue(QUEUE_NAME)); connection.start(); TextMessage message = (TextMessage) consumer.receive(5_000); @@ -310,7 +310,7 @@ private void consumeMessage(String uri, String protocol) throws Exception { private void checkNoMessages(String uri) throws Exception { ConnectionFactory cf = CFUtil.createConnectionFactory("CORE", uri); try (Connection connection = cf.createConnection(); - Session session = connection.createSession(false,Session.AUTO_ACKNOWLEDGE)) { + Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE)) { MessageConsumer consumer = session.createConsumer(session.createQueue(QUEUE_NAME)); connection.start(); assertNull(consumer.receiveNoWait()); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpIngressTimestampTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpIngressTimestampTest.java index 5e9a4db0cb0..5a21abf24f2 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpIngressTimestampTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpIngressTimestampTest.java @@ -126,7 +126,7 @@ private void internalTestIngressTimestamp(Protocol protocol) throws Exception { assertNotNull(ingressTimestampHeader); assertTrue(ingressTimestampHeader instanceof Long); long ingressTimestamp = (Long) ingressTimestampHeader; - assertTrue(ingressTimestamp >= beforeSend && ingressTimestamp <= afterSend,"Ingress timstamp " + ingressTimestamp + " should be >= " + beforeSend + " and <= " + afterSend); + assertTrue(ingressTimestamp >= beforeSend && ingressTimestamp <= afterSend, "Ingress timstamp " + ingressTimestamp + " should be >= " + beforeSend + " and <= " + afterSend); receiver.close(); assertEquals(1, queueView.getMessageCount()); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/connect/AckManagerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/connect/AckManagerTest.java index fc3b53efa3c..9d50880c927 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/connect/AckManagerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/connect/AckManagerTest.java @@ -284,8 +284,8 @@ public void testDirectACK() throws Throwable { Queue c1s1AfterRestart = server1.locateQueue("c1.s1"); assertNotNull(c1s1AfterRestart); - ackManager.addRetry(referenceIDSupplier.getDefaultNodeID(), c1s1, 10_000_000L,AckReason.NORMAL); - ackManager.addRetry(referenceIDSupplier.getDefaultNodeID(), c1s1, 10_000_001L,AckReason.NORMAL); + ackManager.addRetry(referenceIDSupplier.getDefaultNodeID(), c1s1, 10_000_000L, AckReason.NORMAL); + ackManager.addRetry(referenceIDSupplier.getDefaultNodeID(), c1s1, 10_000_001L, AckReason.NORMAL); Wait.assertTrue(() -> ackManager.sortRetries().isEmpty(), 5000); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/connect/MirrorControllerBasicTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/connect/MirrorControllerBasicTest.java index b2f6604731c..6ca68b73915 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/connect/MirrorControllerBasicTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/connect/MirrorControllerBasicTest.java @@ -109,7 +109,7 @@ public void testDirectSend() throws Exception { AmqpValue value = (AmqpValue)amqpMessage.getWrappedMessage().getBody(); assertEquals("body-test", (String)value.getValue()); - assertEquals("ad1",amqpMessage.getMessageAnnotation(AMQPMirrorControllerSource.ADDRESS.toString())); + assertEquals("ad1", amqpMessage.getMessageAnnotation(AMQPMirrorControllerSource.ADDRESS.toString())); assertEquals("qu1", amqpMessage.getMessageAnnotation(AMQPMirrorControllerSource.QUEUE.toString())); assertEquals("someUID", amqpMessage.getMessageAnnotation(AMQPMirrorControllerSource.BROKER_ID.toString())); assertEquals("test", amqpMessage.getMessageAnnotation(AMQPMirrorControllerSource.EVENT_TYPE.toString())); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/bridge/BridgeRoutingTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/bridge/BridgeRoutingTest.java index 8eb2f2c93f2..5bb94acce9d 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/bridge/BridgeRoutingTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/bridge/BridgeRoutingTest.java @@ -155,7 +155,7 @@ private void testBridgeInternal(RoutingType sourceRoutingType, producer.send(session.createMessage(true).setRoutingType(sourceRoutingType)); } Wait.waitFor(() -> server0.locateQueue(source).getMessageCount() == 0, 2000, 100); - Wait.waitFor(() -> server0.getClusterManager().getBridges().get("bridge-0").getMetrics().getMessagesAcknowledged() == 1,2000, 100); + Wait.waitFor(() -> server0.getClusterManager().getBridges().get("bridge-0").getMetrics().getMessagesAcknowledged() == 1, 2000, 100); Thread.sleep(sleepTime); assertTrue(Wait.waitFor(() -> server1.locateQueue(destination).getMessageCount() == destinationMessageCount, 2000, 100)); assertTrue(Wait.waitFor(() -> server0.locateQueue(source).getConsumerCount() == concurrency, 2000, 100)); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConsumerFilterTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConsumerFilterTest.java index 2dc286f0f64..13ce28c860a 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConsumerFilterTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConsumerFilterTest.java @@ -280,7 +280,7 @@ public void testLinkedListOrder() throws Exception { private void readConsumer(String consumerName, ClientConsumer consumer) throws Exception { ClientMessage message = consumer.receive(5000); assertNotNull(message); - logger.debug("consumer = {} message, color={}, msg = {}",consumerName, message.getStringProperty("color"), message.getStringProperty("value")); + logger.debug("consumer = {} message, color={}, msg = {}", consumerName, message.getStringProperty("color"), message.getStringProperty("value")); message.acknowledge(); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/IngressTimestampTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/IngressTimestampTest.java index e076c9defb4..cf789fb331c 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/IngressTimestampTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/IngressTimestampTest.java @@ -177,7 +177,7 @@ private void internalSendReceive(Protocol protocolSender, Protocol protocolConsu assertNotNull(ingressTimestampHeader); assertTrue(ingressTimestampHeader instanceof Long); long ingressTimestamp = (Long) ingressTimestampHeader; - assertTrue(ingressTimestamp >= beforeSend && ingressTimestamp <= afterSend,"Ingress timstamp " + ingressTimestamp + " should be >= " + beforeSend + " and <= " + afterSend); + assertTrue(ingressTimestamp >= beforeSend && ingressTimestamp <= afterSend, "Ingress timstamp " + ingressTimestamp + " should be >= " + beforeSend + " and <= " + afterSend); } } } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusterTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusterTestBase.java index c9b6ee12510..d34c512b3ab 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusterTestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusterTestBase.java @@ -110,7 +110,7 @@ public abstract class ClusterTestBase extends ActiveMQTestBase { private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); - private static final int[] PORTS = {TransportConstants.DEFAULT_PORT, TransportConstants.DEFAULT_PORT + 1, TransportConstants.DEFAULT_PORT + 2, TransportConstants.DEFAULT_PORT + 3, TransportConstants.DEFAULT_PORT + 4, TransportConstants.DEFAULT_PORT + 5, TransportConstants.DEFAULT_PORT + 6, TransportConstants.DEFAULT_PORT + 7, TransportConstants.DEFAULT_PORT + 8, TransportConstants.DEFAULT_PORT + 9,}; + private static final int[] PORTS = {TransportConstants.DEFAULT_PORT, TransportConstants.DEFAULT_PORT + 1, TransportConstants.DEFAULT_PORT + 2, TransportConstants.DEFAULT_PORT + 3, TransportConstants.DEFAULT_PORT + 4, TransportConstants.DEFAULT_PORT + 5, TransportConstants.DEFAULT_PORT + 6, TransportConstants.DEFAULT_PORT + 7, TransportConstants.DEFAULT_PORT + 8, TransportConstants.DEFAULT_PORT + 9}; @RegisterExtension public static PortCheckExtension portCheckExtension = new PortCheckExtension(PORTS); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/MultipleServerFailoverTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/MultipleServerFailoverTestBase.java index 56452e9ff18..d1edd0174b5 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/MultipleServerFailoverTestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/MultipleServerFailoverTestBase.java @@ -157,7 +157,7 @@ public void setUp() throws Exception { String[] input = new String[connectors.size()]; connectors.toArray(input); - configuration.addClusterConfiguration(basicClusterConnectionConfig(livetc.getName(),input)); + configuration.addClusterConfiguration(basicClusterConnectionConfig(livetc.getName(), input)); primaryConfigs.add(configuration); ActiveMQServer server = createServer(true, configuration); TestableServer activeMQServer = new SameProcessActiveMQServer(server); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/federation/FederatedAddressTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/federation/FederatedAddressTest.java index ac051201f88..fed6c985b6a 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/federation/FederatedAddressTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/federation/FederatedAddressTest.java @@ -190,7 +190,7 @@ public void testUpstreamFederatedAddressReplicationOneWayTransformer() throws Ex //Test destroy divert at end @Test public void testDownstreamDivertAddressFirstAndDivertFirstDestroyDivert() throws Exception { - testFederatedAddressDivert(true,true, true, true); + testFederatedAddressDivert(true, true, true, true); } //Test creating address first followed by divert @@ -198,7 +198,7 @@ public void testDownstreamDivertAddressFirstAndDivertFirstDestroyDivert() throws //Test destroy queue at end @Test public void testDownstreamDivertAddressFirstAndDivertFirstDestroyQueue() throws Exception { - testFederatedAddressDivert(true,true, true, false); + testFederatedAddressDivert(true, true, true, false); } //Test creating divert first followed by address @@ -206,7 +206,7 @@ public void testDownstreamDivertAddressFirstAndDivertFirstDestroyQueue() throws //Test destroy divert at end @Test public void testDownstreamDivertAddressSecondDivertFirstDestroyDivert() throws Exception { - testFederatedAddressDivert(true,false, true, true); + testFederatedAddressDivert(true, false, true, true); } //Test creating divert first followed by address @@ -214,7 +214,7 @@ public void testDownstreamDivertAddressSecondDivertFirstDestroyDivert() throws E //Test destroy divert at end @Test public void testDownstreamDivertAddressSecondDivertFirstDestroyQueue() throws Exception { - testFederatedAddressDivert(true,false, true, false); + testFederatedAddressDivert(true, false, true, false); } //Test creating address first followed by divert @@ -222,7 +222,7 @@ public void testDownstreamDivertAddressSecondDivertFirstDestroyQueue() throws Ex //Test destroy divert at end @Test public void testDownstreamDivertAddressFirstDivertSecondDestroyDivert() throws Exception { - testFederatedAddressDivert(true,true, false, true); + testFederatedAddressDivert(true, true, false, true); } //Test creating address first followed by divert @@ -230,7 +230,7 @@ public void testDownstreamDivertAddressFirstDivertSecondDestroyDivert() throws E //Test destroy queue at end @Test public void testDownstreamDivertAddressFirstDivertSecondDestroyQueue() throws Exception { - testFederatedAddressDivert(true,true, false, false); + testFederatedAddressDivert(true, true, false, false); } //Test creating divert first followed by address @@ -238,7 +238,7 @@ public void testDownstreamDivertAddressFirstDivertSecondDestroyQueue() throws Ex //Test destroy divert at end @Test public void testDownstreamDivertAddressAndDivertSecondDestroyDivert() throws Exception { - testFederatedAddressDivert(true,false, false, true); + testFederatedAddressDivert(true, false, false, true); } //Test creating divert first followed by address @@ -246,7 +246,7 @@ public void testDownstreamDivertAddressAndDivertSecondDestroyDivert() throws Exc //Test destroy queue at end @Test public void testDownstreamDivertAddressAndDivertSecondDestroyQueue() throws Exception { - testFederatedAddressDivert(true,false, false, false); + testFederatedAddressDivert(true, false, false, false); } /** @@ -257,7 +257,7 @@ public void testDownstreamDivertAddressAndDivertSecondDestroyQueue() throws Exce //Test destroy divert at end @Test public void testUpstreamDivertAddressAndDivertFirstDestroyDivert() throws Exception { - testFederatedAddressDivert(false,true, true, true); + testFederatedAddressDivert(false, true, true, true); } //Test creating address first followed by divert @@ -265,7 +265,7 @@ public void testUpstreamDivertAddressAndDivertFirstDestroyDivert() throws Except //Test destroy queue at end @Test public void testUpstreamDivertAddressAndDivertFirstDestroyQueue() throws Exception { - testFederatedAddressDivert(false,true, true, false); + testFederatedAddressDivert(false, true, true, false); } //Test creating divert first followed by address @@ -273,7 +273,7 @@ public void testUpstreamDivertAddressAndDivertFirstDestroyQueue() throws Excepti //Test destroy divert at end @Test public void testUpstreamDivertAddressSecondDivertFirstDestroyDivert() throws Exception { - testFederatedAddressDivert(false,false, true, true); + testFederatedAddressDivert(false, false, true, true); } //Test creating divert first followed by address @@ -281,7 +281,7 @@ public void testUpstreamDivertAddressSecondDivertFirstDestroyDivert() throws Exc //Test destroy queue at end @Test public void testUpstreamDivertAddressSecondDivertFirstDestroyQueue() throws Exception { - testFederatedAddressDivert(false,false, true, false); + testFederatedAddressDivert(false, false, true, false); } //Test creating address first followed by divert @@ -289,7 +289,7 @@ public void testUpstreamDivertAddressSecondDivertFirstDestroyQueue() throws Exce //Test destroy divert at end @Test public void testUpstreamDivertAddressFirstDivertSecondDestroyDivert() throws Exception { - testFederatedAddressDivert(false,true, false, true); + testFederatedAddressDivert(false, true, false, true); } //Test creating address first followed by divert @@ -297,7 +297,7 @@ public void testUpstreamDivertAddressFirstDivertSecondDestroyDivert() throws Exc //Test destroy queue at end @Test public void testUpstreamDivertAddressFirstDivertSecondDestroyQueue() throws Exception { - testFederatedAddressDivert(false,true, false, false); + testFederatedAddressDivert(false, true, false, false); } //Test creating divert first followed by address @@ -305,7 +305,7 @@ public void testUpstreamDivertAddressFirstDivertSecondDestroyQueue() throws Exce //Test destroy divert at end @Test public void testUpstreamsDivertAddressAndDivertSecondDestroyDivert() throws Exception { - testFederatedAddressDivert(false,false, false, true); + testFederatedAddressDivert(false, false, false, true); } //Test creating divert first followed by address @@ -313,7 +313,7 @@ public void testUpstreamsDivertAddressAndDivertSecondDestroyDivert() throws Exce //Test destroy queue at end @Test public void testUpstreamDivertAddressAndDivertSecondDestroyQueue() throws Exception { - testFederatedAddressDivert(false,false, false, false); + testFederatedAddressDivert(false, false, false, false); } protected void testFederatedAddressDivert(boolean downstream, boolean addressFirst, boolean divertBeforeConsumer, diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/federation/FederatedQueueTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/federation/FederatedQueueTest.java index 2487a95155d..72cc7348cc8 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/federation/FederatedQueueTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/federation/FederatedQueueTest.java @@ -319,7 +319,7 @@ private void internalTestWithLargeMessages(int messageNumber) throws Exception { ConnectionFactory cf1 = getCF(1); ConnectionFactory cf0 = getCF(0); - final String payload = new String(new byte[1 * 1024 * 1024]).replace('\0','+'); + final String payload = new String(new byte[1 * 1024 * 1024]).replace('\0', '+'); try (Connection connection1 = cf1.createConnection(); Connection connection0 = cf0.createConnection()) { connection1.start(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/ProgrammaticRedeployTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/ProgrammaticRedeployTest.java index 9f73eb62418..6060165b3a5 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/ProgrammaticRedeployTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/ProgrammaticRedeployTest.java @@ -58,7 +58,7 @@ public void testRedeployAddressQueue() throws Exception { ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(); try (JMSContext jmsContext = connectionFactory.createContext()) { - jmsContext.createSharedDurableConsumer(jmsContext.createTopic("config_test_consumer_created_queues"),"mySub").receive(100); + jmsContext.createSharedDurableConsumer(jmsContext.createTopic("config_test_consumer_created_queues"), "mySub").receive(100); } try { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/RedeployTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/RedeployTest.java index c6fbbd64d11..a7a7c408476 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/RedeployTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/RedeployTest.java @@ -1191,7 +1191,7 @@ public void testRedeployAddressQueue() throws Exception { ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(); try (JMSContext jmsContext = connectionFactory.createContext()) { - jmsContext.createSharedDurableConsumer(jmsContext.createTopic("config_test_consumer_created_queues"),"mySub").receive(100); + jmsContext.createSharedDurableConsumer(jmsContext.createTopic("config_test_consumer_created_queues"), "mySub").receive(100); } try { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlTest.java index 3139a726a56..ec60f1cf963 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlTest.java @@ -2882,7 +2882,7 @@ public void testListAllConsumersAsJSONTXCommit() throws Exception { ServerLocator locator = createInVMNonHALocator(); ClientSessionFactory factory = createSessionFactory(locator); - ClientSession session = factory.createSession(true,false, 1); + ClientSession session = factory.createSession(true, false, 1); addClientSession(session); serverControl.createAddress(queueName.toString(), RoutingType.ANYCAST.name()); @@ -2971,7 +2971,7 @@ public void testListAllConsumersAsJSONTXCommitAck() throws Exception { ServerLocator locator = createInVMNonHALocator(); ClientSessionFactory factory = createSessionFactory(locator); - ClientSession session = factory.createSession(true,false, 1); + ClientSession session = factory.createSession(true, false, 1); addClientSession(session); serverControl.createAddress(queueName.toString(), RoutingType.ANYCAST.name()); @@ -3040,7 +3040,7 @@ public void testListAllConsumersAsJSONTXRollback() throws Exception { ServerLocator locator = createInVMNonHALocator(); ClientSessionFactory factory = createSessionFactory(locator); - ClientSession session = factory.createSession(true,false, 1); + ClientSession session = factory.createSession(true, false, 1); addClientSession(session); serverControl.createAddress(queueName.toString(), RoutingType.ANYCAST.name()); @@ -3160,7 +3160,7 @@ public void testListAllConsumersAsJSONCancel() throws Exception { ServerLocator locator = createInVMNonHALocator(); ClientSessionFactory factory = createSessionFactory(locator); - ClientSession session = factory.createSession(true,false, 1); + ClientSession session = factory.createSession(true, false, 1); addClientSession(session); serverControl.createAddress(queueName.toString(), RoutingType.ANYCAST.name()); @@ -3203,7 +3203,7 @@ public void testListAllConsumersAsJSONCancel() throws Exception { //close the consumer to cancel messages and recreate consumer.close(); session.close(); - session = factory.createSession(true,false, 1); + session = factory.createSession(true, false, 1); addClientSession(session); consumer = session.createConsumer(queueName, null, 100, -1, false); @@ -3675,24 +3675,24 @@ public void testListQueuesOrder() throws Exception { server.addAddressInfo(new AddressInfo(queueName1, RoutingType.ANYCAST)); if (legacyCreateQueue) { - server.createQueue(queueName1, RoutingType.ANYCAST, queueName1, SimpleString.of("filter1"),null,true, - false, false,20,false,false); + server.createQueue(queueName1, RoutingType.ANYCAST, queueName1, SimpleString.of("filter1"), null, true, + false, false, 20, false, false); } else { server.createQueue(QueueConfiguration.of(queueName1).setRoutingType(RoutingType.ANYCAST).setFilterString("filter1").setMaxConsumers(20).setAutoCreateAddress(false)); } Thread.sleep(500); server.addAddressInfo(new AddressInfo(queueName2, RoutingType.ANYCAST)); if (legacyCreateQueue) { - server.createQueue(queueName2, RoutingType.ANYCAST, queueName2, SimpleString.of("filter3"), null,true, - false, true,40,false,false); + server.createQueue(queueName2, RoutingType.ANYCAST, queueName2, SimpleString.of("filter3"), null, true, + false, true, 40, false, false); } else { server.createQueue(QueueConfiguration.of(queueName2).setRoutingType(RoutingType.ANYCAST).setFilterString("filter3").setAutoCreated(true).setMaxConsumers(40).setAutoCreateAddress(false)); } Thread.sleep(500); server.addAddressInfo(new AddressInfo(queueName3, RoutingType.ANYCAST)); if (legacyCreateQueue) { - server.createQueue(queueName3, RoutingType.ANYCAST, queueName3, SimpleString.of("filter0"),null,true, - false, false,10,false,false); + server.createQueue(queueName3, RoutingType.ANYCAST, queueName3, SimpleString.of("filter0"), null, true, + false, false, 10, false, false); } else { server.createQueue(QueueConfiguration.of(queueName3).setRoutingType(RoutingType.ANYCAST).setFilterString("filter0").setMaxConsumers(10).setAutoCreateAddress(false)); } @@ -6002,7 +6002,7 @@ public void testListUser() throws Exception { public void testResetUser() throws Exception { ActiveMQServerControl serverControl = createManagementControl(); try { - serverControl.resetUser("x","x","x"); + serverControl.resetUser("x", "x", "x"); fail(); } catch (Exception expected) { } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlUsingCoreTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlUsingCoreTest.java index 5663d93b9ff..fdc3c216cbd 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlUsingCoreTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlUsingCoreTest.java @@ -316,7 +316,7 @@ public void createQueue(String address, String name, boolean durable, String rou } @Override - public void createQueue(String address,String name, String filter, boolean durable, String routingType) throws Exception { + public void createQueue(String address, String name, String filter, boolean durable, String routingType) throws Exception { proxy.invokeOperation("createQueue", address, name, filter, durable, routingType); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlTest.java index 06d8f30a5ad..7f540da331d 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlTest.java @@ -637,7 +637,7 @@ public void testGetConsumerWithMessagesJSON() throws Exception { currentTime = System.currentTimeMillis(); //now make sure they fall between the test time window - assertTrue(currentTime >= lastAcked,"currentTime = " + currentTime + " lastAcked = " + lastAcked); + assertTrue(currentTime >= lastAcked, "currentTime = " + currentTime + " lastAcked = " + lastAcked); consumer.close(); @@ -703,7 +703,7 @@ public void testGetConsumerMessageCountsAutoAck(ConnectionFactory factory, boole for (int i = 0; i < 100; i++) { message = consumer.receive(5000); - assertNotNull(message,"message " + i + " not received"); + assertNotNull(message, "message " + i + " not received"); } JsonArray obj = JsonUtil.readJsonArray(queueControl.listConsumersAsJSON()); @@ -783,7 +783,7 @@ public void testGetConsumerMessageCountsClientAck(ConnectionFactory factory, boo for (int i = 0; i < 100; i++) { message = consumer.receive(5000); - assertNotNull(message,"message " + i + " not received"); + assertNotNull(message, "message " + i + " not received"); message.acknowledge(); } @@ -864,7 +864,7 @@ public void testGetConsumerMessageCountsTransacted(ConnectionFactory factory, bo for (int i = 0; i < 100; i++) { message = consumer.receive(5000); - assertNotNull(message,"message " + i + " not received"); + assertNotNull(message, "message " + i + " not received"); } session.commit(); @@ -941,7 +941,7 @@ public void testGetConsumerMessageCountsTransactedXA(XAConnectionFactory factory session.getXAResource().start(xid, XAResource.TMNOFLAGS); for (int i = 0; i < 100; i++) { message = consumer.receive(5000); - assertNotNull(message,"message " + i + " not received"); + assertNotNull(message, "message " + i + " not received"); } session.getXAResource().end(xid, XAResource.TMSUCCESS); @@ -3702,7 +3702,7 @@ public void testCountMessagesPropertyWithNullFilter() throws Exception { QueueControl queueControl = createManagementControl(address, queue); assertEquals(100, getMessageCount(queueControl)); - String result = queueControl.countMessages(null,null); + String result = queueControl.countMessages(null, null); JsonObject jsonObject = JsonUtil.readJsonObject(result); assertEquals(100, jsonObject.getInt("null")); session.deleteQueue(queue); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt5/ssl/BasicSslTests.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt5/ssl/BasicSslTests.java index e839477a302..3a9a94c43e4 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt5/ssl/BasicSslTests.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt5/ssl/BasicSslTests.java @@ -62,7 +62,7 @@ public void testSimpleSendReceive() throws Exception { byte[] body = RandomUtil.randomBytes(32); CountDownLatch latch = new CountDownLatch(1); - MqttClient subscriber = createPahoClient(protocol,"subscriber"); + MqttClient subscriber = createPahoClient(protocol, "subscriber"); subscriber.connect(getSslMqttConnectOptions()); subscriber.setCallback(new DefaultMqttCallback() { @Override @@ -73,7 +73,7 @@ public void messageArrived(String topic, MqttMessage message) { }); subscriber.subscribe(topic, AT_LEAST_ONCE); - MqttClient producer = createPahoClient(protocol,"producer"); + MqttClient producer = createPahoClient(protocol, "producer"); producer.connect(getSslMqttConnectOptions()); producer.publish(topic, body, 1, false); assertTrue(latch.await(500, TimeUnit.MILLISECONDS)); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt5/ssl/CertificateAuthenticationSslTests.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt5/ssl/CertificateAuthenticationSslTests.java index f490399cd5b..ed3feb12cdd 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt5/ssl/CertificateAuthenticationSslTests.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt5/ssl/CertificateAuthenticationSslTests.java @@ -116,7 +116,7 @@ public void messageArrived(String topic, MqttMessage message) { Wait.assertTrue(() -> getSubscriptionQueue(topic, clientId) != null, 2000, 100); Wait.assertEquals(1, () -> getSubscriptionQueue(topic, clientId).getConsumerCount(), 2000, 100); - MqttClient producer = createPahoClient(protocol,"producer"); + MqttClient producer = createPahoClient(protocol, "producer"); producer.connect(getSslMqttConnectOptions()); producer.publish(topic, body, 1, false); assertTrue(latch.await(500, TimeUnit.MILLISECONDS)); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt5/websocket/BasicWebSocketTests.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt5/websocket/BasicWebSocketTests.java index 18673b56180..8affa236af3 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt5/websocket/BasicWebSocketTests.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt5/websocket/BasicWebSocketTests.java @@ -37,7 +37,7 @@ public void testSimpleSendReceive() throws Exception { byte[] body = RandomUtil.randomBytes(32); CountDownLatch latch = new CountDownLatch(1); - MqttClient subscriber = createPahoClient(WS,"subscriber"); + MqttClient subscriber = createPahoClient(WS, "subscriber"); subscriber.connect(); subscriber.setCallback(new DefaultMqttCallback() { @Override @@ -48,7 +48,7 @@ public void messageArrived(String topic, MqttMessage message) { }); subscriber.subscribe(topic, AT_LEAST_ONCE); - MqttClient producer = createPahoClient(WS,"producer"); + MqttClient producer = createPahoClient(WS, "producer"); producer.connect(); producer.publish(topic, body, 1, false); assertTrue(latch.await(500, TimeUnit.MILLISECONDS)); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/OpenWireTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/OpenWireTestBase.java index c8cefbead8b..3e2c333ea98 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/OpenWireTestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/OpenWireTestBase.java @@ -118,7 +118,7 @@ public void setUp() throws Exception { addServer(server); server.start(); - coreCf = ActiveMQJMSClient.createConnectionFactory("vm://0?reconnectAttempts=-1","cf"); + coreCf = ActiveMQJMSClient.createConnectionFactory("vm://0?reconnectAttempts=-1", "cf"); } protected void configureAddressSettings(Map addressSettingsMap) { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/PrefetchRedeliveryCountOpenwireTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/PrefetchRedeliveryCountOpenwireTest.java index f186dbf7635..823324c2d61 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/PrefetchRedeliveryCountOpenwireTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/PrefetchRedeliveryCountOpenwireTest.java @@ -761,7 +761,7 @@ public void println(String s) { } } }; - PrintData.printData(server.getConfiguration().getBindingsLocation(),server.getConfiguration().getJournalLocation(),server.getConfiguration().getPagingLocation(), out, true, true, true, false, -1); + PrintData.printData(server.getConfiguration().getBindingsLocation(), server.getConfiguration().getJournalLocation(), server.getConfiguration().getPagingLocation(), out, true, true, true, false, -1); throw e; } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/SessionHandlingOpenWireTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/SessionHandlingOpenWireTest.java index 327d5229b0d..596039be54b 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/SessionHandlingOpenWireTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/SessionHandlingOpenWireTest.java @@ -44,7 +44,7 @@ public void testInternalSessionHandling() throws Exception { AssertionLoggerHandler loggerHandler = new AssertionLoggerHandler()) { conn.start(); try (Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE)) { - Destination dest = createDestination(session,ActiveMQDestination.QUEUE_TYPE); + Destination dest = createDestination(session, ActiveMQDestination.QUEUE_TYPE); sendMessages(session, dest, 1); MessageConsumer consumer = session.createConsumer(dest); Message m = consumer.receive(2000); @@ -62,7 +62,7 @@ public void testInternalSessionHandlingNoSessionClose() throws Exception { conn.start(); for (int i = 0; i < 100; i++) { Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - Destination dest = createDestination(session,ActiveMQDestination.QUEUE_TYPE); + Destination dest = createDestination(session, ActiveMQDestination.QUEUE_TYPE); sendMessages(session, dest, 1); MessageConsumer consumer = session.createConsumer(dest); Message m = consumer.receive(2000); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/SimpleOpenWireTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/SimpleOpenWireTest.java index 7ee594b08e3..a14bb395118 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/SimpleOpenWireTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/SimpleOpenWireTest.java @@ -647,7 +647,7 @@ public void testTopicNoLocal() throws Exception { MessageConsumer nolocalConsumer = session.createConsumer(dest, null, true); MessageConsumer consumer = session.createConsumer(dest, null, false); - MessageConsumer selectorConsumer = session.createConsumer(dest,"TESTKEY = 'test'", false); + MessageConsumer selectorConsumer = session.createConsumer(dest, "TESTKEY = 'test'", false); MessageProducer producer = session.createProducer(dest); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JMSConsumer13Test.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JMSConsumer13Test.java index 84fbf94a982..7011d76de67 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JMSConsumer13Test.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JMSConsumer13Test.java @@ -43,7 +43,7 @@ public class JMSConsumer13Test extends BasicOpenWireTest { @Parameters(name = "deliveryMode={0} destinationType={1}") public static Collection getParams() { - return Arrays.asList(new Object[][]{{DeliveryMode.NON_PERSISTENT, ActiveMQDestination.QUEUE_TYPE}, {DeliveryMode.NON_PERSISTENT, ActiveMQDestination.TOPIC_TYPE}, {DeliveryMode.NON_PERSISTENT, ActiveMQDestination.TEMP_QUEUE_TYPE}, {DeliveryMode.NON_PERSISTENT, ActiveMQDestination.TEMP_TOPIC_TYPE}, {DeliveryMode.PERSISTENT, ActiveMQDestination.QUEUE_TYPE}, {DeliveryMode.PERSISTENT, ActiveMQDestination.TOPIC_TYPE}, {DeliveryMode.PERSISTENT, ActiveMQDestination.TEMP_QUEUE_TYPE}, {DeliveryMode.PERSISTENT, ActiveMQDestination.TEMP_TOPIC_TYPE},}); + return Arrays.asList(new Object[][]{{DeliveryMode.NON_PERSISTENT, ActiveMQDestination.QUEUE_TYPE}, {DeliveryMode.NON_PERSISTENT, ActiveMQDestination.TOPIC_TYPE}, {DeliveryMode.NON_PERSISTENT, ActiveMQDestination.TEMP_QUEUE_TYPE}, {DeliveryMode.NON_PERSISTENT, ActiveMQDestination.TEMP_TOPIC_TYPE}, {DeliveryMode.PERSISTENT, ActiveMQDestination.QUEUE_TYPE}, {DeliveryMode.PERSISTENT, ActiveMQDestination.TOPIC_TYPE}, {DeliveryMode.PERSISTENT, ActiveMQDestination.TEMP_QUEUE_TYPE}, {DeliveryMode.PERSISTENT, ActiveMQDestination.TEMP_TOPIC_TYPE}}); } public int deliveryMode; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JMSMessageTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JMSMessageTest.java index 1ebcf873b6f..64f70a98403 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JMSMessageTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JMSMessageTest.java @@ -55,7 +55,7 @@ public class JMSMessageTest extends BasicOpenWireTest { @Parameters(name = "deliveryMode={0} destinationType={1}") public static Collection getParams() { - return Arrays.asList(new Object[][]{{DeliveryMode.NON_PERSISTENT, ActiveMQDestination.QUEUE_TYPE}, {DeliveryMode.PERSISTENT, ActiveMQDestination.QUEUE_TYPE},}); + return Arrays.asList(new Object[][]{{DeliveryMode.NON_PERSISTENT, ActiveMQDestination.QUEUE_TYPE}, {DeliveryMode.PERSISTENT, ActiveMQDestination.QUEUE_TYPE}}); } public int deliveryMode = DeliveryMode.NON_PERSISTENT; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/RedeliveryPolicyTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/RedeliveryPolicyTest.java index c78d88f7618..f22863d6994 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/RedeliveryPolicyTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/RedeliveryPolicyTest.java @@ -747,10 +747,10 @@ public void testRedeliveryPolicyPerDestination() throws Exception { MessageConsumer topicConsumer = session.createDurableSubscriber(topic, "tp1"); // Send the messages - send(session, producer, queue,"1st"); - send(session, producer, queue,"2nd"); - send(session, producer, topic,"1st"); - send(session, producer, topic,"2nd"); + send(session, producer, queue, "1st"); + send(session, producer, queue, "2nd"); + send(session, producer, topic, "1st"); + send(session, producer, topic, "2nd"); session.commit(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/JournalFileSizeTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/JournalFileSizeTest.java index 2d98fcfef10..72c998c72a8 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/JournalFileSizeTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/JournalFileSizeTest.java @@ -73,7 +73,7 @@ public void testIncorrectFileSizeHalf() throws Exception { ConfigurationImpl config = createBasicConfig(); int origFileSize = config.getJournalFileSize(); config.setJournalFileSize(origFileSize + (align / 2)); - JournalStorageManager manager = new JournalStorageManager(config,EmptyCriticalAnalyzer.getInstance(), new OrderedExecutorFactory(null), new OrderedExecutorFactory(null)); + JournalStorageManager manager = new JournalStorageManager(config, EmptyCriticalAnalyzer.getInstance(), new OrderedExecutorFactory(null), new OrderedExecutorFactory(null)); int fileSize = manager.getMessageJournal().getFileSize(); assertEquals(origFileSize + align, fileSize); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/metrics/JournalPendingMessageTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/metrics/JournalPendingMessageTest.java index 0dd651ffd4f..70328ef98ae 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/metrics/JournalPendingMessageTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/metrics/JournalPendingMessageTest.java @@ -474,7 +474,7 @@ public void testMessageSizeSharedDurable() throws Exception { // The publish method will create a second shared consumer Session s = connection.createSession(); MessageConsumer c = s.createSharedDurableConsumer(s.createTopic(defaultTopicName), "sub1"); - publishTestMessagesDurable(connection, new String[] {"sub1",}, 200, publishedMessageSize, + publishTestMessagesDurable(connection, new String[] {"sub1"}, 200, publishedMessageSize, DeliveryMode.PERSISTENT, true); // verify the count and size - double because two durables so two queue diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/plugin/ResourceBrokerPluginTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/plugin/ResourceBrokerPluginTest.java index 8209cc2b36b..77971072cfa 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/plugin/ResourceBrokerPluginTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/plugin/ResourceBrokerPluginTest.java @@ -142,7 +142,7 @@ public void afterPutTransaction(Xid xid, RemotingConnection remotingConnection) throws ActiveMQException { if (xid.getFormatId() == JTA_FORMAT_ID) { // https://github.com/jbosstm/narayana/blob/5.10.5.Final/ArjunaJTA/jta/classes/com/arjuna/ats/jta/xa/XATxConverter.java#L188 - String nodeName = new String(Arrays.copyOfRange(xid.getGlobalTransactionId(),28, xid.getGlobalTransactionId().length), StandardCharsets.UTF_8); + String nodeName = new String(Arrays.copyOfRange(xid.getGlobalTransactionId(), 28, xid.getGlobalTransactionId().length), StandardCharsets.UTF_8); String clientAddress = clients.putIfAbsent(nodeName, remotingConnection.getRemoteAddress()); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/plugin/XmlConfigPluginTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/plugin/XmlConfigPluginTest.java index a686f515582..aac240f6382 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/plugin/XmlConfigPluginTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/plugin/XmlConfigPluginTest.java @@ -61,7 +61,7 @@ public void testLoggingActiveMQServerPlugin() throws Exception { try { server.start(); assertEquals(1, server.getBrokerPlugins().size(), "only one plugin should be registered"); - assertTrue(server.getBrokerPlugins().get(0) instanceof LoggingActiveMQServerPlugin,"ensure LoggingActiveMQServerPlugin is registered"); + assertTrue(server.getBrokerPlugins().get(0) instanceof LoggingActiveMQServerPlugin, "ensure LoggingActiveMQServerPlugin is registered"); LoggingActiveMQServerPlugin loggingActiveMQServerPlugin = (LoggingActiveMQServerPlugin) server.getBrokerPlugins().get(0); assertTrue(loggingActiveMQServerPlugin.isLogAll(), "check logAll"); assertTrue(loggingActiveMQServerPlugin.isLogConnectionEvents(), "check logConnectionEvents"); @@ -87,7 +87,7 @@ public void testLoggingActiveMQServerPluginWrongValue() throws Exception { try { server.start(); assertEquals(1, server.getBrokerPlugins().size(), "only one plugin should be registered"); - assertTrue(server.getBrokerPlugins().get(0) instanceof LoggingActiveMQServerPlugin,"ensure LoggingActiveMQServerPlugin is registered"); + assertTrue(server.getBrokerPlugins().get(0) instanceof LoggingActiveMQServerPlugin, "ensure LoggingActiveMQServerPlugin is registered"); LoggingActiveMQServerPlugin loggingActiveMQServerPlugin = (LoggingActiveMQServerPlugin) server.getBrokerPlugins().get(0); assertFalse(loggingActiveMQServerPlugin.isLogAll(), "check logAll"); assertFalse(loggingActiveMQServerPlugin.isLogConnectionEvents(), "check logConnectionEvents"); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/routing/ElasticQueueTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/routing/ElasticQueueTest.java index 364ed532700..3199c41f26f 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/routing/ElasticQueueTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/routing/ElasticQueueTest.java @@ -475,7 +475,7 @@ public void testScale0_1() throws Exception { int usage = addressControl0.getAddressLimitPercent(); System.out.println("Want 100% on Head&Tail, usage % " + usage); return usage == 100; - },10000, 500)); + }, 10000, 500)); // stop producer on Node0, only accept consumers ConnectionRouterControl routerControl0 = (ConnectionRouterControl) ManagementControlHelper.createProxy(node0NameBuilder.getConnectionRouterObjectName(roleNameSharder), ConnectionRouterControl.class, mBeanServer); @@ -495,7 +495,7 @@ public void testScale0_1() throws Exception { } catch (javax.management.InstanceNotFoundException notYetReadyExpected) { } return false; - },5000, 200), "Producer is on Head, Node1"); + }, 5000, 200), "Producer is on Head, Node1"); // wait for Node0 to drain eqConsumer.delayMillis.set(0); // fast @@ -503,7 +503,7 @@ public void testScale0_1() throws Exception { int usage = addressControl0.getAddressLimitPercent(); System.out.println("Want 0, Node0 (tail) usage % " + usage); return usage == 0; - },20000, 500)); + }, 20000, 500)); routerControl0.setLocalTargetFilter(""); // Node0 is out of service, Node1 (new head&tail) is where it is all at going forward! ConnectionRouterControl routerControl0Control1 = (ConnectionRouterControl) ManagementControlHelper.createProxy(node1NameBuilder.getConnectionRouterObjectName(roleNameSharder), ConnectionRouterControl.class, mBeanServer); @@ -518,7 +518,7 @@ public void testScale0_1() throws Exception { int usage = addressControl1.getAddressLimitPercent(); System.out.println("Node1 usage % " + usage); return usage == 100; - },10000, 200), "New head&tail, Node1 full"); + }, 10000, 200), "New head&tail, Node1 full"); // stop the producer eqProducer.done.set(true); @@ -563,7 +563,7 @@ public void testScale0_1_CombinedProducerConsumerConnectionWithProducerRole() th } catch (javax.management.InstanceNotFoundException notYetReadyExpected) { } return false; - },10000, 200)); + }, 10000, 200)); assertTrue(Wait.waitFor(() -> eqProducerConsumer.connectionCount.get() > 2), "producer got full error and reconnected"); @@ -586,7 +586,7 @@ public void testScale0_1_CombinedProducerConsumerConnectionWithProducerRole() th } catch (javax.management.InstanceNotFoundException notYetReadyExpected) { } return false; - },10000, 200)); + }, 10000, 200)); // need another connection to drain tail EQConsumer eqConsumer = new EQConsumer(urlForNodes(nodes), 0); @@ -597,12 +597,12 @@ public void testScale0_1_CombinedProducerConsumerConnectionWithProducerRole() th int usage = addressControl0.getAddressLimitPercent(); System.out.println("Tail usage % " + usage); return usage == 0; - },10000, 200)); + }, 10000, 200)); assertTrue(Wait.waitFor(() -> { System.out.println("drain tail, lastProduced: " + lastProducedToHeadTail + ", consumed: " + eqConsumer.getLastConsumed()); return lastProducedToHeadTail == eqConsumer.getLastConsumed(); - },5000, 100)); + }, 5000, 100)); eqConsumer.done.set(true); @@ -619,7 +619,7 @@ public void testScale0_1_CombinedProducerConsumerConnectionWithProducerRole() th int usage = addressControl1.getAddressLimitPercent(); System.out.println("Head&Tail usage % " + usage); return usage == 100; - },10000, 200)); + }, 10000, 200)); eqProducerConsumer.producerDone.set(true); @@ -628,11 +628,11 @@ public void testScale0_1_CombinedProducerConsumerConnectionWithProducerRole() th int usage = addressControl1.getAddressLimitPercent(); System.out.println("Node1 usage % " + usage + ", eqProducerConsumer: " + eqProducerConsumer); return usage == 0; - },10000, 500)); + }, 10000, 500)); assertTrue(Wait.waitFor(() -> { return pidInRange("head&tail", eqProducerConsumer.getLastProduced(), eqProducerConsumer.getLastConsumed()); - },5000, 100)); + }, 5000, 100)); eqProducerConsumer.done.set(true); @@ -662,7 +662,7 @@ public void testScale0_1_CombinedRoleConnection() throws Exception { } catch (javax.management.InstanceNotFoundException notYetReadyExpected) { } return false; - },20000, 200)); + }, 20000, 200)); assertTrue(Wait.waitFor(() -> eqProducerConsumer.connectionCount.get() > 0), "producer got full error and reconnected"); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/scheduling/ScheduledMessageTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/scheduling/ScheduledMessageTest.java index 688e6e2588a..b9e6ad1d83a 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/scheduling/ScheduledMessageTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/scheduling/ScheduledMessageTest.java @@ -570,7 +570,7 @@ public void testManagementDeleteById() throws Exception { @Test public void testManagementDeliveryByFilter() throws Exception { final String propertyValue = RandomUtil.randomString(); - final String propertyName = "X" + RandomUtil.randomString().replace("-",""); + final String propertyName = "X" + RandomUtil.randomString().replace("-", ""); ClientSessionFactory sessionFactory = createSessionFactory(locator); ClientSession session = sessionFactory.createSession(false, false, false); session.createQueue(QueueConfiguration.of(atestq)); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/SecurityTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/SecurityTest.java index 560d842769f..8a2b573ffb7 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/SecurityTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/SecurityTest.java @@ -229,7 +229,7 @@ public void testJAASSecurityManagerAuthenticationWithPasswordCodec() throws Exce ClientSessionFactory cf = createSessionFactory(locator); try { - ClientSession session = cf.createSession("test","password", false, true, true, false, 0); + ClientSession session = cf.createSession("test", "password", false, true, true, false, 0); session.close(); } catch (ActiveMQException e) { e.printStackTrace(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ConfigurationTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ConfigurationTest.java index bb508e0f29b..7a6b400fac5 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ConfigurationTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ConfigurationTest.java @@ -77,7 +77,7 @@ public void testQueueWithoutAddressName() throws Exception { @Test public void testPropertiesConfigReload() throws Exception { - File propsFile = new File(getTestDirfile(),"some.props"); + File propsFile = new File(getTestDirfile(), "some.props"); propsFile.createNewFile(); ConfigurationImpl.InsertionOrderedProperties config = new ConfigurationImpl.InsertionOrderedProperties(); @@ -90,7 +90,7 @@ public void testPropertiesConfigReload() throws Exception { config.put("addressConfigurations.mytopic_3.queueConfigs.\"queue.B3\".address", "mytopic_3"); config.put("addressConfigurations.mytopic_3.queueConfigs.\"queue.B3\".routingType", "MULTICAST"); - config.put("status","{\"generation\": \"1\"}"); + config.put("status", "{\"generation\": \"1\"}"); try (FileOutputStream outStream = new FileOutputStream(propsFile)) { config.store(outStream, null); @@ -114,7 +114,7 @@ public void testPropertiesConfigReload() throws Exception { // add new binding from props update config.put("addressConfigurations.mytopic_3.queueConfigs.\"queue.C3\".address", "mytopic_3"); - config.put("status","{\"generation\": \"2\"}"); + config.put("status", "{\"generation\": \"2\"}"); try (FileOutputStream outStream = new FileOutputStream(propsFile)) { config.store(outStream, null); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTest.java index 991b019a4d2..d972e50d6c2 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTest.java @@ -777,7 +777,7 @@ public void testIngressTimestamp() throws Exception { String ingressTimestampHeader = frame.getHeader(Stomp.Headers.Message.INGRESS_TIMESTAMP); assertNotNull(ingressTimestampHeader); long ingressTimestamp = Long.parseLong(ingressTimestampHeader); - assertTrue(ingressTimestamp >= beforeSend && ingressTimestamp <= afterSend,"Ingress timstamp " + ingressTimestamp + " should be >= " + beforeSend + " and <= " + afterSend); + assertTrue(ingressTimestamp >= beforeSend && ingressTimestamp <= afterSend, "Ingress timstamp " + ingressTimestamp + " should be >= " + beforeSend + " and <= " + afterSend); conn.disconnect(); } diff --git a/tests/joram-tests/src/test/java/org/apache/activemq/artemis/amqpJMS/JoramAMQPAggregationTest.java b/tests/joram-tests/src/test/java/org/apache/activemq/artemis/amqpJMS/JoramAMQPAggregationTest.java index 1c5f6a3c077..882d6bd50c7 100644 --- a/tests/joram-tests/src/test/java/org/apache/activemq/artemis/amqpJMS/JoramAMQPAggregationTest.java +++ b/tests/joram-tests/src/test/java/org/apache/activemq/artemis/amqpJMS/JoramAMQPAggregationTest.java @@ -48,7 +48,7 @@ import org.objectweb.jtests.jms.framework.JMSTestCase; @RunWith(Suite.class) -@SuiteClasses({TopicConnectionTest.class, ConnectionTest.class, MessageBodyTest.class, MessageDefaultTest.class, MessageTypeTest.class, MessageHeaderTest.class, JMSXPropertyTest.class, MessagePropertyConversionTest.class, MessagePropertyTest.class, QueueBrowserTest.class, TemporaryQueueTest.class, SelectorSyntaxTest.class, SelectorTest.class, QueueSessionTest.class, SessionTest.class, TopicSessionTest.class, UnifiedSessionTest.class, TemporaryTopicTest.class,}) +@SuiteClasses({TopicConnectionTest.class, ConnectionTest.class, MessageBodyTest.class, MessageDefaultTest.class, MessageTypeTest.class, MessageHeaderTest.class, JMSXPropertyTest.class, MessagePropertyConversionTest.class, MessagePropertyTest.class, QueueBrowserTest.class, TemporaryQueueTest.class, SelectorSyntaxTest.class, SelectorTest.class, QueueSessionTest.class, SessionTest.class, TopicSessionTest.class, UnifiedSessionTest.class, TemporaryTopicTest.class}) public class JoramAMQPAggregationTest extends Assert { /** diff --git a/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/JoramCoreAggregationTest.java b/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/JoramCoreAggregationTest.java index 7448b9ca041..96bd41b5841 100644 --- a/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/JoramCoreAggregationTest.java +++ b/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/JoramCoreAggregationTest.java @@ -48,7 +48,7 @@ import org.objectweb.jtests.jms.framework.JMSTestCase; @RunWith(Suite.class) -@SuiteClasses({TopicConnectionTest.class, ConnectionTest.class, MessageBodyTest.class, MessageDefaultTest.class, MessageTypeTest.class, MessageHeaderTest.class, JMSXPropertyTest.class, MessagePropertyConversionTest.class, MessagePropertyTest.class, QueueBrowserTest.class, TemporaryQueueTest.class, SelectorSyntaxTest.class, SelectorTest.class, QueueSessionTest.class, SessionTest.class, TopicSessionTest.class, UnifiedSessionTest.class, TemporaryTopicTest.class,}) +@SuiteClasses({TopicConnectionTest.class, ConnectionTest.class, MessageBodyTest.class, MessageDefaultTest.class, MessageTypeTest.class, MessageHeaderTest.class, JMSXPropertyTest.class, MessagePropertyConversionTest.class, MessagePropertyTest.class, QueueBrowserTest.class, TemporaryQueueTest.class, SelectorSyntaxTest.class, SelectorTest.class, QueueSessionTest.class, SessionTest.class, TopicSessionTest.class, UnifiedSessionTest.class, TemporaryTopicTest.class}) public class JoramCoreAggregationTest extends Assert { /** diff --git a/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/jmx2/JmxServerControlTest.java b/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/jmx2/JmxServerControlTest.java index 31803317f6c..673664d1ba7 100644 --- a/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/jmx2/JmxServerControlTest.java +++ b/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/jmx2/JmxServerControlTest.java @@ -114,7 +114,7 @@ public void testListConsumers() throws Exception { MessageConsumer consumer = cf.createConnection().createSession(true, Session.SESSION_TRANSACTED).createConsumer(new ActiveMQQueue(queueName)); try { - String options = JsonUtil.toJsonObject(Map.of("field","queue", "operation", "EQUALS", "value", queueName)).toString(); + String options = JsonUtil.toJsonObject(Map.of("field", "queue", "operation", "EQUALS", "value", queueName)).toString(); String consumersAsJsonString = activeMQServerControl.listConsumers(options, 1, 10); JsonObject consumersAsJsonObject = JsonUtil.readJsonObject(consumersAsJsonString); diff --git a/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/jmxmultiplefailback/ReplicatedMultipleFailbackTest.java b/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/jmxmultiplefailback/ReplicatedMultipleFailbackTest.java index 0876e97d2b5..9489f161f70 100644 --- a/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/jmxmultiplefailback/ReplicatedMultipleFailbackTest.java +++ b/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/jmxmultiplefailback/ReplicatedMultipleFailbackTest.java @@ -129,7 +129,7 @@ private static long countNodes(Map> networkTopology return count; } - private static boolean validateNetworkTopology(String networkTopologyJson,Predicate>> checkTopology) { + private static boolean validateNetworkTopology(String networkTopologyJson, Predicate>> checkTopology) { final Map> networkTopology = decodeNetworkTopologyJson(networkTopologyJson); return checkTopology.test(networkTopology); } diff --git a/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/logging/AuditLoggerResourceTest.java b/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/logging/AuditLoggerResourceTest.java index 8b1c08019f5..0aef1d66403 100644 --- a/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/logging/AuditLoggerResourceTest.java +++ b/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/logging/AuditLoggerResourceTest.java @@ -66,25 +66,25 @@ public void testAuditResourceLog() throws Exception { serverControl.createAddress("auditAddress", "ANYCAST,MULTICAST"); assertTrue(findLogRecord(getAuditLog(), "successfully created address:")); serverControl.updateAddress("auditAddress", "ANYCAST"); - assertTrue(findLogRecord(getAuditLog(),"successfully updated address:")); + assertTrue(findLogRecord(getAuditLog(), "successfully updated address:")); serverControl.deleteAddress("auditAddress"); - assertTrue(findLogRecord(getAuditLog(),"successfully deleted address:")); + assertTrue(findLogRecord(getAuditLog(), "successfully deleted address:")); serverControl.createQueue("auditAddress", "auditQueue", "ANYCAST"); - assertTrue(findLogRecord(getAuditLog(),"successfully created queue:")); + assertTrue(findLogRecord(getAuditLog(), "successfully created queue:")); serverControl.updateQueue("auditQueue", "ANYCAST", -1, false); final QueueControl queueControl = MBeanServerInvocationHandler.newProxyInstance(mBeanServerConnection, objectNameBuilder.getQueueObjectName(SimpleString.of( "auditAddress"), SimpleString.of("auditQueue"), RoutingType.ANYCAST), QueueControl.class, false); - assertTrue(findLogRecord(getAuditLog(),"successfully updated queue:")); + assertTrue(findLogRecord(getAuditLog(), "successfully updated queue:")); queueControl.removeAllMessages(); - assertTrue(findLogRecord(getAuditLog(),"has removed 0 messages")); + assertTrue(findLogRecord(getAuditLog(), "has removed 0 messages")); queueControl.sendMessage(new HashMap<>(), 0, "foo", true, "admin", "admin"); - assertTrue(findLogRecord(getAuditLog(),"sent message to")); + assertTrue(findLogRecord(getAuditLog(), "sent message to")); CompositeData[] browse = queueControl.browse(); - assertTrue(findLogRecord(getAuditLog(),"browsed " + browse.length + " messages")); + assertTrue(findLogRecord(getAuditLog(), "browsed " + browse.length + " messages")); serverControl.destroyQueue("auditQueue"); - assertTrue(findLogRecord(getAuditLog(),"successfully deleted queue:")); + assertTrue(findLogRecord(getAuditLog(), "successfully deleted queue:")); ServerLocator locator = createNettyNonHALocator(); ClientSessionFactory sessionFactory = locator.createSessionFactory(); @@ -122,10 +122,10 @@ private void testConnectionAuditLog(String protocol, String url) throws Exceptio ConnectionFactory factory = CFUtil.createConnectionFactory(protocol, url); Connection connection = factory.createConnection(); Session s = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); - assertTrue(findLogRecord(getAuditLog(),"AMQ601767: " + protocol + " connection")); + assertTrue(findLogRecord(getAuditLog(), "AMQ601767: " + protocol + " connection")); s.close(); connection.close(); - assertTrue(findLogRecord(getAuditLog(),"AMQ601768: " + protocol + " connection")); + assertTrue(findLogRecord(getAuditLog(), "AMQ601768: " + protocol + " connection")); } @Test @@ -140,8 +140,8 @@ public void testMQTTConnectionAuditLog() throws Exception { final BlockingConnection connection = mqtt.blockingConnection(); connection.connect(); connection.disconnect(); - assertTrue(findLogRecord(getAuditLog(),"AMQ601767: MQTT connection")); - assertTrue(findLogRecord(getAuditLog(),"AMQ601768: MQTT connection")); + assertTrue(findLogRecord(getAuditLog(), "AMQ601767: MQTT connection")); + assertTrue(findLogRecord(getAuditLog(), "AMQ601768: MQTT connection")); } @Test @@ -149,7 +149,7 @@ public void testStompConnectionAuditLog() throws Exception { StompClientConnection connection = StompClientConnectionFactory.createClientConnection(new URI("tcp://localhost:61613")); connection.connect(); connection.disconnect(); - assertTrue(findLogRecord(getAuditLog(),"AMQ601767: STOMP connection")); - assertTrue(findLogRecord(getAuditLog(),"AMQ601768: STOMP connection")); + assertTrue(findLogRecord(getAuditLog(), "AMQ601767: STOMP connection")); + assertTrue(findLogRecord(getAuditLog(), "AMQ601768: STOMP connection")); } } diff --git a/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/logging/AuditLoggerTest.java b/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/logging/AuditLoggerTest.java index fef73c3c60a..6349afa8fcc 100644 --- a/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/logging/AuditLoggerTest.java +++ b/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/logging/AuditLoggerTest.java @@ -94,7 +94,7 @@ public void testAuditLog() throws Exception { Wait.waitFor(() -> addressControl.getMessageCount() == 1); assertEquals(1, addressControl.getMessageCount()); - assertTrue(findLogRecord(getAuditLog(),"sending a message", uniqueStr)); + assertTrue(findLogRecord(getAuditLog(), "sending a message", uniqueStr)); //failure log address = RandomUtil.randomSimpleString(); @@ -117,9 +117,9 @@ public void testAuditLog() throws Exception { //ignore } - assertTrue(findLogRecord(getAuditLog(),"AMQ601264: User guest", "gets security check failure, reason = AMQ229213: User: guest does not have permission='DELETE_NON_DURABLE_QUEUE'")); + assertTrue(findLogRecord(getAuditLog(), "AMQ601264: User guest", "gets security check failure, reason = AMQ229213: User: guest does not have permission='DELETE_NON_DURABLE_QUEUE'")); //hot patch not in log - assertTrue(findLogRecord(getAuditLog(),"is sending a message")); + assertTrue(findLogRecord(getAuditLog(), "is sending a message")); } @Test diff --git a/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/upgradeTest/CompareUpgradeTest.java b/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/upgradeTest/CompareUpgradeTest.java index b7fda6591e7..ecd8e5223b4 100644 --- a/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/upgradeTest/CompareUpgradeTest.java +++ b/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/upgradeTest/CompareUpgradeTest.java @@ -207,7 +207,7 @@ public void testWindows() throws Exception { Map brokerProfileResult = checkExpectedValues(windowsETC + "/artemis.profile.cmd", "set ARTEMIS_HOME=", null, // no expected value for this, we will check on the output "set ARTEMIS_INSTANCE=", "\"" + windows + "\"", - "set ARTEMIS_DATA_DIR=","\"" + windowsData + "\"", + "set ARTEMIS_DATA_DIR=", "\"" + windowsData + "\"", "set ARTEMIS_ETC_DIR=", "\"" + windowsETC + "\"", "set ARTEMIS_OOME_DUMP=", "\"" + windows + "/log/oom_dump.hprof\"", "set ARTEMIS_INSTANCE_URI=", "\"file:" + windows + "/\"", @@ -233,7 +233,7 @@ public void testWindows() throws Exception { Map utilityProfileResult = checkExpectedValues(utilityProfilePath, "set ARTEMIS_HOME=", null, // no expected value for this, we will check on the output "set ARTEMIS_INSTANCE=", "\"" + windows + "\"", - "set ARTEMIS_DATA_DIR=","\"" + windowsData + "\"", + "set ARTEMIS_DATA_DIR=", "\"" + windowsData + "\"", "set ARTEMIS_ETC_DIR=", "\"" + windowsETC + "\"", "set ARTEMIS_OOME_DUMP=", "\"" + windows + "/log/oom_dump.hprof\"", "set ARTEMIS_INSTANCE_URI=", "\"file:" + windows + "/\"", diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyConnectorTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyConnectorTest.java index 24f84e0cb46..df19067ec99 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyConnectorTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyConnectorTest.java @@ -244,7 +244,7 @@ public void testOverridesJavaSystemPropertyFail() throws Exception { params.put(TransportConstants.SSL_ENABLED_PROP_NAME, true); params.put(TransportConstants.KEYSTORE_PATH_PROP_NAME, "client-keystore.jks"); params.put(TransportConstants.KEYSTORE_PASSWORD_PROP_NAME, "securepass"); - params.put(TransportConstants.TRUSTSTORE_PATH_PROP_NAME,"server-ca-truststore.jks"); + params.put(TransportConstants.TRUSTSTORE_PATH_PROP_NAME, "server-ca-truststore.jks"); params.put(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME, "securepass"); NettyConnector connector = new NettyConnector(params, handler, listener, executorService, Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName())), Executors.newScheduledThreadPool(5, ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()))); @@ -306,7 +306,7 @@ public void testOverridesJavaSystemPropertyForceSSLParameters() throws Exception params.put(TransportConstants.FORCE_SSL_PARAMETERS, true); params.put(TransportConstants.KEYSTORE_PATH_PROP_NAME, "client-keystore.jks"); params.put(TransportConstants.KEYSTORE_PASSWORD_PROP_NAME, "securepass"); - params.put(TransportConstants.TRUSTSTORE_PATH_PROP_NAME,"server-ca-truststore.jks"); + params.put(TransportConstants.TRUSTSTORE_PATH_PROP_NAME, "server-ca-truststore.jks"); params.put(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME, "securepass"); NettyConnector connector = new NettyConnector(params, handler, listener, executorService, Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory(getClass().getName())), Executors.newScheduledThreadPool(5, ActiveMQThreadFactory.defaultThreadFactory(getClass().getName()))); diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/ObjectInputStreamWithClassLoaderTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/ObjectInputStreamWithClassLoaderTest.java index 59956210424..3a29ff421be 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/ObjectInputStreamWithClassLoaderTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/ObjectInputStreamWithClassLoaderTest.java @@ -176,7 +176,7 @@ public void testAllowDenyList() throws Exception { assertTrue(result instanceof ClassNotFoundException); denyList = "org.apache.activemq.artemis.tests.unit.util.deserialization.pkg2"; - result = readSerializedObject(null, denyList,serailizeFile); + result = readSerializedObject(null, denyList, serailizeFile); assertNull(result); denyList = "some.other.package";