Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ private void upgradeJDK(ActionContext context, String jdkPrefix, String endOfLin
},
newLine -> {
if (newLine.trim().startsWith(jdkPrefix)) {
String result = JVMArgumentParser.parseNewLine(jdkPrefix, endOfLine, newLine, keepArguments, currentArguments);
String result = JVMArgumentParser.parseNewLine(jdkPrefix, endOfLine, newLine, keepArguments, currentArguments);
return result;
} else {
for (String prefix : keepingPrefixes) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ private void checkNodeDiskUsage(final CheckContext context) throws Exception {
Double diskStoreUsage = context.getManagementProxy().
getAttribute("broker", "DiskStoreUsage", Double.class, 0);

checkNodeResourceUsage("DiskStoreUsage", (int)(diskStoreUsage * 100), maxDiskUsage);
checkNodeResourceUsage("DiskStoreUsage", (int)(diskStoreUsage * 100), maxDiskUsage);
}

private void checkNodeMemoryUsage(final CheckContext context) throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,13 @@ protected void recoverConnectionInformation() {
if (CONNECTION_INFORMATION.get() != null) {
ConnectionInformation connectionInfo = CONNECTION_INFORMATION.get();
if (this.user == null) {
this.user = connectionInfo.user;
this.user = connectionInfo.user;
}
if (this.password == null) {
this.password = connectionInfo.password;
this.password = connectionInfo.password;
}
if (this.brokerURL == null || this.brokerURL == DEFAULT_BROKER_URL) {
this.brokerURL = connectionInfo.uri;
this.brokerURL = connectionInfo.uri;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public static Process startServer(String artemisInstance, String serverName, int
}

public static Process startServer(String artemisInstance, String serverName, String uri, int timeout) throws Exception {
return startServer(artemisInstance, serverName, uri, timeout, null);
return startServer(artemisInstance, serverName, uri, timeout, null);
}

public static Process startServer(String artemisInstance, String serverName, String uri, int timeout, File propertiesFile) throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public void testCreateBrokerConfigurationWithJaasDomainAndCertificateDomainFromS
public void testCreateBrokerConfigurationWithNewJaasDomainFromExistingJaasSecurityAndSystemProperties() throws Exception {
setSystemProperty(securityJaasPropertyPrefix + "domain", "newTestDomain");

JaasSecurityDTO security = new JaasSecurityDTO();
JaasSecurityDTO security = new JaasSecurityDTO();
security.domain = "testDomain";
security.certificateDomain = "testCertificateDomain";
BrokerDTO broker = new BrokerDTO();
Expand All @@ -141,7 +141,7 @@ public void testCreateBrokerConfigurationWithNewJaasDomainFromExistingJaasSecuri
public void testCreateBrokerConfigurationWithNewJaasCertificateDomainFromExistingJaasSecurityAndSystemProperties() throws Exception {
setSystemProperty(securityJaasPropertyPrefix + "certificateDomain", "newTestCertificateDomain");

JaasSecurityDTO security = new JaasSecurityDTO();
JaasSecurityDTO security = new JaasSecurityDTO();
security.domain = "testDomain";
security.certificateDomain = "testCertificateDomain";
BrokerDTO broker = new BrokerDTO();
Expand All @@ -158,7 +158,7 @@ public void testCreateBrokerConfigurationWithNewJaasCertificateDomainFromExistin
public void testCreateBrokerConfigurationWithNewJaasDomainFromExistingSecurityManagerAndSystemProperties() throws Exception {
setSystemProperty(securityJaasPropertyPrefix + "domain", "newTestDomain");

SecurityManagerDTO security = new SecurityManagerDTO();
SecurityManagerDTO security = new SecurityManagerDTO();
security.className = "testClass";
BrokerDTO broker = new BrokerDTO();
broker.security = security;
Expand All @@ -174,7 +174,7 @@ public void testCreateBrokerConfigurationWithNewJaasDomainFromExistingSecurityMa
public void testCreateBrokerConfigurationWithNewJaasCertificateDomainFromExistingSecurityManagerAndSystemProperties() throws Exception {
setSystemProperty(securityJaasPropertyPrefix + "certificateDomain", "newTestCertificateDomain");

SecurityManagerDTO security = new SecurityManagerDTO();
SecurityManagerDTO security = new SecurityManagerDTO();
security.className = "testClass";
BrokerDTO broker = new BrokerDTO();
broker.security = security;
Expand All @@ -191,7 +191,7 @@ public void testCreateBrokerConfigurationWithNewJaasDomainAndCertificateDomainFr
setSystemProperty(securityJaasPropertyPrefix + "domain", "newTestDomain");
setSystemProperty(securityJaasPropertyPrefix + "certificateDomain", "newTestCertificateDomain");

JaasSecurityDTO security = new JaasSecurityDTO();
JaasSecurityDTO security = new JaasSecurityDTO();
security.domain = "testDomain";
security.certificateDomain = "testCertificateDomain";
BrokerDTO broker = new BrokerDTO();
Expand All @@ -209,7 +209,7 @@ public void testCreateBrokerConfigurationWithNewJaasDomainAndCertificateDomainFr
setSystemProperty(securityJaasPropertyPrefix + "domain", "newTestDomain");
setSystemProperty(securityJaasPropertyPrefix + "certificateDomain", "newTestCertificateDomain");

SecurityManagerDTO security = new SecurityManagerDTO();
SecurityManagerDTO security = new SecurityManagerDTO();
security.className = "testClassName";
BrokerDTO broker = new BrokerDTO();
broker.security = security;
Expand Down Expand Up @@ -273,7 +273,7 @@ public void testCreateBrokerConfigurationWithSecurityManagerClassNameAndProperti
public void testCreateBrokerConfigurationWithNewSecurityManagerClassNameFromExistingSecurityManagerAndSystemProperties() throws Exception {
setSystemProperty(securityManagerPropertyPrefix + "className", "newTestClassName");

SecurityManagerDTO security = new SecurityManagerDTO();
SecurityManagerDTO security = new SecurityManagerDTO();
security.className = "testClassName";
security.properties = new ArrayList<>(List.of(
new PropertyDTO("testKey1", "testValue1"),
Expand All @@ -294,7 +294,7 @@ public void testCreateBrokerConfigurationWithNewSecurityManagerPropertiesFromExi
setSystemProperty(securityManagerPropertyPrefix + "properties.testKey1", "newTestValue1");
setSystemProperty(securityManagerPropertyPrefix + "properties.newTestKey2", "newTestValue2");

SecurityManagerDTO security = new SecurityManagerDTO();
SecurityManagerDTO security = new SecurityManagerDTO();
security.className = "testClassName";
security.properties = new ArrayList<>(List.of(
new PropertyDTO("testKey1", "testValue1"),
Expand All @@ -317,7 +317,7 @@ public void testCreateBrokerConfigurationWithNewSecurityManagerClassNameAndPrope
setSystemProperty(securityManagerPropertyPrefix + "properties.testKey1", "newTestValue1");
setSystemProperty(securityManagerPropertyPrefix + "properties.newTestKey2", "newTestValue2");

SecurityManagerDTO security = new SecurityManagerDTO();
SecurityManagerDTO security = new SecurityManagerDTO();
security.className = "testClassName";
security.properties = new ArrayList<>(List.of(
new PropertyDTO("testKey1", "testValue1"),
Expand All @@ -338,7 +338,7 @@ public void testCreateBrokerConfigurationWithNewSecurityManagerClassNameAndPrope
public void testCreateBrokerConfigurationWithNewSecurityManagerClassNameFromExistingJaasSecurityAndSystemProperties() throws Exception {
setSystemProperty(securityManagerPropertyPrefix + "className", "newTestClassName");

JaasSecurityDTO security = new JaasSecurityDTO();
JaasSecurityDTO security = new JaasSecurityDTO();
security.domain = "testDomain";
security.certificateDomain = "testCertificateDomain";
BrokerDTO broker = new BrokerDTO();
Expand All @@ -356,7 +356,7 @@ public void testCreateBrokerConfigurationWithNewSecurityManagerPropertiesFromExi
setSystemProperty(securityManagerPropertyPrefix + "properties.testKey1", "newTestValue1");
setSystemProperty(securityManagerPropertyPrefix + "properties.newTestKey2", "newTestValue2");

JaasSecurityDTO security = new JaasSecurityDTO();
JaasSecurityDTO security = new JaasSecurityDTO();
security.domain = "testDomain";
security.certificateDomain = "testCertificateDomain";
BrokerDTO broker = new BrokerDTO();
Expand All @@ -375,7 +375,7 @@ public void testCreateBrokerConfigurationWithNewSecurityManagerClassNameAndPrope
setSystemProperty(securityManagerPropertyPrefix + "properties.testKey1", "newTestValue1");
setSystemProperty(securityManagerPropertyPrefix + "properties.newTestKey2", "newTestValue2");

JaasSecurityDTO security = new JaasSecurityDTO();
JaasSecurityDTO security = new JaasSecurityDTO();
security.domain = "testDomain";
security.certificateDomain = "testCertificateDomain";
BrokerDTO broker = new BrokerDTO();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public void testArgumentsLinux() {
String[] fixedArguments = new String[]{"-Xmx", "-Xms"};

Map<String, String> usedArgs = new HashMap<>();
JVMArgumentParser.parseOriginalArgs(prefix, "\"", arguments, Collections.emptyMap(), fixedArguments, usedArgs);
JVMArgumentParser.parseOriginalArgs(prefix, "\"", arguments, Collections.emptyMap(), fixedArguments, usedArgs);
assertEquals(2, usedArgs.size());
assertEquals("-Xmx77G", usedArgs.get("-Xmx"));
assertEquals("-Xms333M", usedArgs.get("-Xms"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public void setup() throws Exception {
super.setup();
}

private void setupScanTimeout() throws Exception {
private void setupScanTimeout() throws Exception {
timeBefore = ActiveMQDefaultConfiguration.getDefaultAddressQueueScanPeriod();
org.apache.activemq.artemis.api.config.ActiveMQDefaultConfigurationTestAccessor.setDefaultAddressQueueScanPeriod(100);
}
Expand Down Expand Up @@ -1531,9 +1531,9 @@ private void testAutoDelete(boolean autoDelete) throws Exception {
// This is usually set when run from the command line via artemis.profile
Run.setEmbedded(true);
if (autoDelete) {
Artemis.main("create", instanceFolder.getAbsolutePath(), "--force", "--silent", "--no-web", "--no-autotune", "--require-login", "--autodelete");
Artemis.main("create", instanceFolder.getAbsolutePath(), "--force", "--silent", "--no-web", "--no-autotune", "--require-login", "--autodelete");
} else {
Artemis.main("create", instanceFolder.getAbsolutePath(), "--force", "--silent", "--no-web", "--require-login", "--no-autotune");
Artemis.main("create", instanceFolder.getAbsolutePath(), "--force", "--silent", "--no-web", "--require-login", "--no-autotune");
}
System.setProperty("artemis.instance", instanceFolder.getAbsolutePath());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
* An operation failed because an address exists on the server.
*/
public class ActiveMQDeleteAddressException extends ActiveMQException {
public class ActiveMQDeleteAddressException extends ActiveMQException {

public ActiveMQDeleteAddressException() {
super(ActiveMQExceptionType.DELETE_ADDRESS_ERROR);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ public static void longToBytes(long x, byte[] output, int offset) {
output[offset + 3] = (byte)(x >>> 32);
output[offset + 4] = (byte)(x >>> 24);
output[offset + 5] = (byte)(x >>> 16);
output[offset + 6] = (byte)(x >>> 8);
output[offset + 6] = (byte)(x >>> 8);
output[offset + 7] = (byte)(x);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public static Object getInstanceWithTypeCheck(String className,

public static Object getInstanceForParamsWithTypeCheck(String className,
Class<?> expectedType,
ClassLoader loader, Class<?>[] parameterTypes, Object... params) throws ClassNotFoundException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException {
ClassLoader loader, Class<?>[] parameterTypes, Object... params) throws ClassNotFoundException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException {
final Class<?> clazz = loadWithCheck(className, expectedType, loader);
return clazz.getDeclaredConstructor(parameterTypes).newInstance(params);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public String getFromEnv(String v) {
codecFromEnvVarConfig.init(params);
String blaVersion = codecFromEnvVarConfig.encode(someString);
Map<String, String> twoWayParams = Map.of(DefaultSensitiveStringCodec.ALGORITHM, DefaultSensitiveStringCodec.TWO_WAY);
assertNotEquals(blaVersion, PasswordMaskingUtil.getDefaultCodec(twoWayParams).encode(someString));
assertNotEquals(blaVersion, PasswordMaskingUtil.getDefaultCodec(twoWayParams).encode(someString));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ public void testMultipleNonSized() {

metric.setOverCallback(() -> over.set(true));
metric.setOnSizeCallback(metricMain::addSize);
for (int i = 0; i < 10; i++) {
for (int i = 0; i < 10; i++) {
metric.addSize(10, true);
}

Expand All @@ -511,7 +511,7 @@ public void testMultipleNonSized() {
assertEquals(0, metricMain.getElements());
assertEquals(0, metric.getElements());

for (int i = 0; i < 10; i++) {
for (int i = 0; i < 10; i++) {
metric.addSize(10, false);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ public static String getDefaultHapolicyBackupStrategy() {
private static boolean DEFAULT_FAILOVER_ON_SERVER_SHUTDOWN = false;

// Will a shared-store primary startup wait for activation
private static boolean DEFAULT_WAIT_FOR_ACTIVATION = true;
private static boolean DEFAULT_WAIT_FOR_ACTIVATION = true;

// Will the broker populate the message with the name of the validated user
private static boolean DEFAULT_POPULATE_VALIDATED_USER = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ default boolean isExpired() {

Message setUserID(Object userID);

default String getValidatedUserID() {
default String getValidatedUserID() {
return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public final class ActiveMQClient {

private static int globalScheduledThreadPoolSize;

private static int globalFlowControlThreadPoolSize;
private static int globalFlowControlThreadPoolSize;

public static final String DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME = RoundRobinConnectionLoadBalancingPolicy.class.getCanonicalName();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1630,7 +1630,7 @@ void addSecuritySettings(@Parameter(desc = "an address match", name = "addressMa
*/
@Operation(desc = "Add security-settings for matching addresses", impact = MBeanOperationInfo.ACTION)
void addSecuritySettings(@Parameter(desc = "an address match", name = "addressMatch") String addressMatch,
@Parameter(desc = "The configuration of the security-settings as JSON", name = "securitySettingsAsJson") String securitySettingsAsJson) throws Exception;
@Parameter(desc = "The configuration of the security-settings as JSON", name = "securitySettingsAsJson") String securitySettingsAsJson) throws Exception;

@Operation(desc = "Remove security settings for an address", impact = MBeanOperationInfo.ACTION)
void removeSecuritySettings(@Parameter(desc = "an address match", name = "addressMatch") String addressMatch) throws Exception;
Expand Down Expand Up @@ -1957,7 +1957,7 @@ void addAddressSettings(@Parameter(desc = "an address match", name = "addressMat
*/
@Operation(desc = "Add address settings for addresses matching the addressMatch", impact = MBeanOperationInfo.ACTION)
String addAddressSettings(@Parameter(desc = "an address match", name = "addressMatch") String address,
@Parameter(desc = "The configuration of the address settings as JSON", name = "addressSettingsAsJson") String addressSettingsAsJson) throws Exception;
@Parameter(desc = "The configuration of the address settings as JSON", name = "addressSettingsAsJson") String addressSettingsAsJson) throws Exception;

@Operation(desc = "Remove address settings", impact = MBeanOperationInfo.ACTION)
void removeAddressSettings(@Parameter(desc = "an address match", name = "addressMatch") String addressMatch) throws Exception;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ int moveMessages(@Parameter(name = "flushLimit", desc = "Limit to flush transact

@Operation(desc = "Send a copy of the message with given messageID to another queue)", impact = MBeanOperationInfo.ACTION)
boolean copyMessage(@Parameter(name = "messageID", desc = "A message ID") long messageID,
@Parameter(name = "targetQueue", desc = "The name of the queue to copy the messages to") String targetQueue) throws Exception;
@Parameter(name = "targetQueue", desc = "The name of the queue to copy the messages to") String targetQueue) throws Exception;

/**
* Sends the message corresponding to the specified message ID to this queue's dead letter address.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class SimpleManagement implements AutoCloseable {

private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());

private static final String SIMPLE_OPTIONS = "{\"field\":\"\",\"value\":\"\",\"operation\":\"\"}";
private static final String SIMPLE_OPTIONS = "{\"field\":\"\",\"value\":\"\",\"operation\":\"\"}";

String uri, user, password;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public void send(SimpleString address1,
checkClosed();

if (handler != null) {
handler = session.wrap(handler);
handler = session.wrap(handler);
}

doSend(address1, message, handler);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,47 +33,47 @@ public interface CoreRemotingConnection extends RemotingConnection {

default boolean isVersionBeforeAddressChange() {
int version = getChannelVersion();
return (version > 0 && version < PacketImpl.ADDRESSING_CHANGE_VERSION);
return (version > 0 && version < PacketImpl.ADDRESSING_CHANGE_VERSION);
}

default boolean isVersionBeforeAsyncResponseChange() {
int version = getChannelVersion();
return (version > 0 && version < PacketImpl.ASYNC_RESPONSE_CHANGE_VERSION);
return (version > 0 && version < PacketImpl.ASYNC_RESPONSE_CHANGE_VERSION);
}

default boolean isVersionSupportConsumerPriority() {
int version = getChannelVersion();
return version >= PacketImpl.CONSUMER_PRIORITY_CHANGE_VERSION;
return version >= PacketImpl.CONSUMER_PRIORITY_CHANGE_VERSION;
}

default boolean isVersionNewFQQN() {
int version = getChannelVersion();
return version >= PacketImpl.ARTEMIS_2_7_0_VERSION;
return version >= PacketImpl.ARTEMIS_2_7_0_VERSION;
}

default boolean isVersionSupportClientID() {
int version = getChannelVersion();
return version >= PacketImpl.ARTEMIS_2_18_0_VERSION;
return version >= PacketImpl.ARTEMIS_2_18_0_VERSION;
}

default boolean isVersionSupportRouting() {
int version = getChannelVersion();
return version >= PacketImpl.ARTEMIS_2_18_0_VERSION;
return version >= PacketImpl.ARTEMIS_2_18_0_VERSION;
}

default boolean isVersionSupportCommitV2() {
int version = getChannelVersion();
return version >= PacketImpl.ARTEMIS_2_21_0_VERSION;
return version >= PacketImpl.ARTEMIS_2_21_0_VERSION;
}

default boolean isVersionUsingLongOnPageReplication() {
int version = getChannelVersion();
return version >= PacketImpl.ARTEMIS_2_24_0_VERSION;
return version >= PacketImpl.ARTEMIS_2_24_0_VERSION;
}

default boolean isBeforeTwoEighteen() {
int version = getChannelVersion();
return version < PacketImpl.ARTEMIS_2_18_0_VERSION;
return version < PacketImpl.ARTEMIS_2_18_0_VERSION;
}

default boolean isBeforeProducerMetricsChanged() {
Expand Down
Loading