Skip to content

Commit 1a3df02

Browse files
authored
spring-projectsGH-10069: Mitigate warning: [this-escape] in the project
Fixes: spring-projects#10069 Suppress warnings introduced with Java 24 build toolchain: spring-integration-core: - Add `@SuppressWarnings("this-escape")` for 23 constructor calls - Make `PublisherAnnotationAdvisor.pointcut` `transient` (serial warning) spring-integration-amqp: - Add `@SuppressWarnings("this-escape")` for 7 constructor calls spring-integration-cassandra: - Add `@SuppressWarnings("this-escape")` for 1 constructor call spring-integration-event: - Add `@SuppressWarnings("this-escape")` for 1 constructor call spring-integration-file: - Add `@SuppressWarnings("this-escape")` for 4 constructor calls - Fix 2 deprecation warnings (`Locale` constructor, `Runtime.exec`) spring-integration-ftp: - Add `@SuppressWarnings("this-escape")` for 4 constructor calls spring-integration-graphql: - Add `@SuppressWarnings("this-escape")` for 1 constructor call spring-integration-jms: - Add `@SuppressWarnings("this-escape")` for 3 constructor calls spring-integration-jmx: - Add `@SuppressWarnings("this-escape")` for 1 constructor call spring-integration-kafka: - Add `@SuppressWarnings("this-escape")` for 4 constructor calls spring-integration-mail: - Add `@SuppressWarnings("this-escape")` for 5 constructor calls spring-integration-mqtt: - Add `@SuppressWarnings("this-escape")` for 2 constructor calls spring-integration-redis: - Add `@SuppressWarnings("this-escape")` for 1 constructor call spring-integration-rsocket: - Add `@SuppressWarnings("this-escape")` for 1 constructor call spring-integration-sftp: - Add `@SuppressWarnings("this-escape")` for 4 constructor calls - Fix 1 serial warnings spring-integration-smb: - Add `@SuppressWarnings("this-escape")` for 3 constructor calls spring-integration-webflux: - Add `@SuppressWarnings("this-escape")` for 1 constructor call spring-integration-websocket: - Add `@SuppressWarnings("this-escape")` for 1 constructor call spring-integration-ws: - Add `@SuppressWarnings("this-escape")` for 6 constructor calls spring-integration-xml: - Add `@SuppressWarnings("this-escape")` for 1 constructor call - Fix 1 deprecation warnings (`Locale` constructor) spring-integration-xmpp: - Add `@SuppressWarnings("this-escape")` for 1 constructor call spring-integration-zeromq: - Add `@SuppressWarnings("this-escape")` for 2 constructor calls Signed-off-by: Jooyoung Pyoung <[email protected]>
1 parent d229cb4 commit 1a3df02

File tree

66 files changed

+142
-60
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+142
-60
lines changed

spring-integration-amqp/src/main/java/org/springframework/integration/amqp/inbound/AmqpInboundChannelAdapter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2024 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -130,6 +130,7 @@ public enum BatchMode {
130130
* Construct an instance using the provided container.
131131
* @param listenerContainer the container.
132132
*/
133+
@SuppressWarnings("this-escape")
133134
public AmqpInboundChannelAdapter(MessageListenerContainer listenerContainer) {
134135
Assert.notNull(listenerContainer, "listenerContainer must not be null");
135136
Assert.isNull(listenerContainer.getMessageListener(),

spring-integration-amqp/src/main/java/org/springframework/integration/amqp/inbound/AmqpInboundGateway.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2024 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -98,6 +98,7 @@ public class AmqpInboundGateway extends MessagingGatewaySupport {
9898

9999
private boolean replyHeadersMappedLast;
100100

101+
@SuppressWarnings("this-escape")
101102
public AmqpInboundGateway(AbstractMessageListenerContainer listenerContainer) {
102103
this(listenerContainer, new RabbitTemplate(listenerContainer.getConnectionFactory()), false);
103104
}
@@ -108,10 +109,12 @@ public AmqpInboundGateway(AbstractMessageListenerContainer listenerContainer) {
108109
* @param listenerContainer the {@link MessageListenerContainer} to receive AMQP messages.
109110
* @param amqpTemplate the {@link AmqpTemplate} to send reply messages.
110111
*/
112+
@SuppressWarnings("this-escape")
111113
public AmqpInboundGateway(MessageListenerContainer listenerContainer, AmqpTemplate amqpTemplate) {
112114
this(listenerContainer, amqpTemplate, true);
113115
}
114116

117+
@SuppressWarnings("this-escape")
115118
private AmqpInboundGateway(MessageListenerContainer listenerContainer, AmqpTemplate amqpTemplate,
116119
boolean amqpTemplateExplicitlySet) {
117120

spring-integration-amqp/src/main/java/org/springframework/integration/amqp/outbound/AmqpOutboundEndpoint.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2024 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -65,6 +65,7 @@ public class AmqpOutboundEndpoint extends AbstractAmqpOutboundEndpoint
6565

6666
private boolean multiSend;
6767

68+
@SuppressWarnings("this-escape")
6869
public AmqpOutboundEndpoint(AmqpTemplate amqpTemplate) {
6970
Assert.notNull(amqpTemplate, "amqpTemplate must not be null");
7071
this.amqpTemplate = amqpTemplate;

spring-integration-amqp/src/main/java/org/springframework/integration/amqp/outbound/AsyncAmqpOutboundGateway.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2022 the original author or authors.
2+
* Copyright 2016-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -52,6 +52,7 @@ public class AsyncAmqpOutboundGateway extends AbstractAmqpOutboundEndpoint {
5252

5353
private final MessageConverter messageConverter;
5454

55+
@SuppressWarnings("this-escape")
5556
public AsyncAmqpOutboundGateway(AsyncRabbitTemplate template) {
5657
Assert.notNull(template, "AsyncRabbitTemplate cannot be null");
5758
this.template = template;

spring-integration-amqp/src/main/java/org/springframework/integration/amqp/support/DefaultAmqpHeaderMapper.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2024 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -91,6 +91,7 @@ public class DefaultAmqpHeaderMapper extends AbstractHeaderMapper<MessagePropert
9191
STANDARD_HEADER_NAMES.add(AmqpHeaders.SPRING_REPLY_TO_STACK);
9292
}
9393

94+
@SuppressWarnings("this-escape")
9495
protected DefaultAmqpHeaderMapper(String[] requestHeaderNames, String[] replyHeaderNames) {
9596
super(AmqpHeaders.PREFIX, STANDARD_HEADER_NAMES, STANDARD_HEADER_NAMES);
9697
if (requestHeaderNames != null) {

spring-integration-cassandra/src/main/java/org/springframework/integration/cassandra/outbound/CassandraMessageHandler.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2022-2024 the original author or authors.
2+
* Copyright 2022-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -93,6 +93,7 @@ public CassandraMessageHandler(ReactiveCassandraOperations cassandraOperations)
9393
this(cassandraOperations, Type.INSERT);
9494
}
9595

96+
@SuppressWarnings("this-escape")
9697
public CassandraMessageHandler(ReactiveCassandraOperations cassandraOperations,
9798
CassandraMessageHandler.Type queryType) {
9899

spring-integration-core/src/main/java/org/springframework/integration/aop/PublisherAnnotationAdvisor.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2024 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -42,6 +42,7 @@
4242
* @author Mark Fisher
4343
* @author Gary Russell
4444
* @author Artem Bilan
45+
* @author Jooyoung Pyoung
4546
*
4647
* @since 2.0
4748
*/
@@ -51,7 +52,7 @@ public class PublisherAnnotationAdvisor extends AbstractPointcutAdvisor implemen
5152

5253
private final transient MessagePublishingInterceptor interceptor;
5354

54-
private final Pointcut pointcut;
55+
private final transient Pointcut pointcut;
5556

5657
public PublisherAnnotationAdvisor() {
5758
this(Publisher.class);

spring-integration-core/src/main/java/org/springframework/integration/channel/MessagePublishingErrorHandler.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2024 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -53,11 +53,13 @@ public class MessagePublishingErrorHandler extends ErrorMessagePublisher impleme
5353
}
5454
};
5555

56+
@SuppressWarnings("this-escape")
5657
public MessagePublishingErrorHandler() {
5758
setErrorMessageStrategy(DEFAULT_ERROR_MESSAGE_STRATEGY);
5859
setSendTimeout(DEFAULT_SEND_TIMEOUT);
5960
}
6061

62+
@SuppressWarnings("this-escape")
6163
public MessagePublishingErrorHandler(DestinationResolver<MessageChannel> channelResolver) {
6264
this();
6365
setChannelResolver(channelResolver);

spring-integration-core/src/main/java/org/springframework/integration/config/TransformerFactoryBean.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2024 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -37,6 +37,7 @@
3737
*/
3838
public class TransformerFactoryBean extends AbstractStandardMessageHandlerFactoryBean {
3939

40+
@SuppressWarnings("this-escape")
4041
public TransformerFactoryBean() {
4142
setRequiresReply(true);
4243
}

spring-integration-core/src/main/java/org/springframework/integration/config/xml/StandardHeaderEnricherParser.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -40,6 +40,7 @@
4040
*/
4141
public class StandardHeaderEnricherParser extends HeaderEnricherParserSupport {
4242

43+
@SuppressWarnings("this-escape")
4344
public StandardHeaderEnricherParser() {
4445
addElementToHeaderMapping("reply-channel", MessageHeaders.REPLY_CHANNEL);
4546
addElementToHeaderMapping("error-channel", MessageHeaders.ERROR_CHANNEL);

0 commit comments

Comments
 (0)