Added default `ConnectionAcceptor#listen` method that takes an optional attachment as a parameter
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/reactor/ConnectionAcceptor.java b/httpcore5/src/main/java/org/apache/hc/core5/reactor/ConnectionAcceptor.java
index e98eb61..07d601b 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/reactor/ConnectionAcceptor.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/reactor/ConnectionAcceptor.java
@@ -48,6 +48,24 @@
* dispatcher.
*
* @param address the socket address to listen on.
+ * @param attachment the attachment object.
+ * @param callback the result callback.
+ * @return listener endpoint.
+ *
+ * @since 5.2
+ */
+ default Future<ListenerEndpoint> listen(
+ SocketAddress address, Object attachment, FutureCallback<ListenerEndpoint> callback) {
+ return listen(address, callback);
+ }
+
+ /**
+ * Opens a new listener endpoint with the given socket address. Once
+ * the endpoint is fully initialized it starts accepting incoming
+ * connections and propagates I/O activity notifications to the I/O event
+ * dispatcher.
+ *
+ * @param address the socket address to listen on.
* @param callback the result callback.
* @return listener endpoint.
*/
diff --git a/pom.xml b/pom.xml
index 7b1f751..9df0312 100644
--- a/pom.xml
+++ b/pom.xml
@@ -184,6 +184,13 @@
<parameter>
<breakBuildOnBinaryIncompatibleModifications>true</breakBuildOnBinaryIncompatibleModifications>
<breakBuildOnSourceIncompatibleModifications>true</breakBuildOnSourceIncompatibleModifications>
+ <overrideCompatibilityChangeParameters>
+ <overrideCompatibilityChangeParameter>
+ <compatibilityChange>METHOD_NEW_DEFAULT</compatibilityChange>
+ <binaryCompatible>true</binaryCompatible>
+ <sourceCompatible>true</sourceCompatible>
+ </overrideCompatibilityChangeParameter>
+ </overrideCompatibilityChangeParameters>
<excludes>
<exclude>@org.apache.hc.core5.annotation.Internal</exclude>
</excludes>