Fix sonar findings on 21 style (#3020)

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
Avgustin Marinov
2026-04-15 16:57:10 +03:00
committed by GitHub
parent 643e96b7b1
commit 82ee1cc4e6
12 changed files with 284 additions and 273 deletions

View File

@@ -39,7 +39,7 @@ public class AmqpDeadletterProperties {
* @return map which holds the properties
*/
public Map<String, Object> getDeadLetterExchangeArgs(final String exchange) {
final Map<String, Object> args = new HashMap<>(1);
final Map<String, Object> args = HashMap.newHashMap(1);
args.put("x-dead-letter-exchange", exchange);
return args;
}
@@ -55,7 +55,7 @@ public class AmqpDeadletterProperties {
}
private Map<String, Object> getTTLArgs() {
final Map<String, Object> args = new HashMap<>(1);
final Map<String, Object> args = HashMap.newHashMap(1);
args.put("x-message-ttl", getTtl());
return args;
}

View File

@@ -142,7 +142,7 @@ public class DmfAmqpDeclarationConfiguration {
}
private static Map<String, Object> getTTLMaxArgsAuthenticationQueue() {
final Map<String, Object> args = new HashMap<>(2);
final Map<String, Object> args = HashMap.newHashMap(2);
args.put("x-message-ttl", Duration.ofSeconds(30).toMillis());
args.put("x-max-length", 1_000);
return args;