GH-10069: Mitigate warning: [this-escape] in the project

Fixes: https://github.com/spring-projects/spring-integration/issues/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 <pyoungjy@gmail.com>
This commit is contained in:
Jooyoung Pyoung
2025-06-10 00:53:17 +09:00
committed by GitHub
parent d229cb4930
commit 1a3df027e2
66 changed files with 142 additions and 60 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2020-2022 the original author or authors.
* Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -128,6 +128,7 @@ public class ZeroMqChannel extends AbstractMessageChannel implements Subscribabl
* @param context the {@link ZContext} to use.
* @param pubSub the communication model: push/pull or pub/sub.
*/
@SuppressWarnings("this-escape")
public ZeroMqChannel(ZContext context, boolean pubSub) {
Assert.notNull(context, "'context' must not be null");
this.context = context;
@@ -141,6 +142,7 @@ public class ZeroMqChannel extends AbstractMessageChannel implements Subscribabl
this.subscriberData = prepareSubscriberDataFlux();
}
@SuppressWarnings("this-escape")
private Mono<Integer> prepareProxyMono() {
return Mono.defer(() -> {
if (this.zeroMqProxy != null) {