From efb414ba44182ffcb9ef6fb14c343a7399631e7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20Cogolu=C3=A8gnes?= <514737+acogoluegnes@users.noreply.github.com> Date: Wed, 3 Dec 2025 10:23:53 +0100 Subject: [PATCH] Revert ConnectionFactory return type in some methods Some changes from main snuck into 5.x during a merge. This affects 3 methods in ConnectionFactory that used to return void and returned ConnectionFactory because of the unexpected merge. The change is source-compatible but not binary-compatible. It should not affect many users, but we try to stick to backward compatibility so we go back to returning void. References #1810 --- src/main/java/com/rabbitmq/client/ConnectionFactory.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/rabbitmq/client/ConnectionFactory.java b/src/main/java/com/rabbitmq/client/ConnectionFactory.java index 416f8baa9..25c1ec0cd 100644 --- a/src/main/java/com/rabbitmq/client/ConnectionFactory.java +++ b/src/main/java/com/rabbitmq/client/ConnectionFactory.java @@ -1382,9 +1382,8 @@ public Connection newConnection( * @deprecated user {@link #netty()} instead */ @Deprecated - public ConnectionFactory setNioParams(NioParams nioParams) { + public void setNioParams(NioParams nioParams) { this.nioParams = nioParams; - return this; } /** @@ -1415,20 +1414,18 @@ public NioParams getNioParams() { * @deprecated Use {@link #netty()} instead */ @Deprecated - public ConnectionFactory useNio() { + public void useNio() { this.nio = true; this.netty = false; - return this; } /** * Use blocking IO for communication with the server. With blocking IO, each connection creates * its own thread to read data from the server. */ - public ConnectionFactory useBlockingIo() { + public void useBlockingIo() { this.nio = false; this.netty = false; - return this; } /**