This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-mvnd.git
commit 60a2248f197d8f70f3c72dfb99ef65598ccb8ea7 Author: Sylwester Lachiewicz <[email protected]> AuthorDate: Mon Oct 26 11:02:06 2026 +0100 Compare the unix socket address in its platform path form On Windows UnixDomainSocketAddress prints its path with backslashes. --- .../src/test/java/org/mvndaemon/mvnd/common/SocketFamilyTest.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/common/src/test/java/org/mvndaemon/mvnd/common/SocketFamilyTest.java b/common/src/test/java/org/mvndaemon/mvnd/common/SocketFamilyTest.java index ff3e1ec4..d651658b 100644 --- a/common/src/test/java/org/mvndaemon/mvnd/common/SocketFamilyTest.java +++ b/common/src/test/java/org/mvndaemon/mvnd/common/SocketFamilyTest.java @@ -22,6 +22,7 @@ import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.SocketAddress; import java.net.UnknownHostException; +import java.nio.file.Paths; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.condition.EnabledForJreRange; @@ -68,8 +69,10 @@ public class SocketFamilyTest { @Test @EnabledForJreRange(min = JRE.JAVA_16) void testUnixFromTo() { - SocketAddress address = SocketFamily.fromString("unix:/tmp/foo-0123456.socket"); + // the address keeps its path as a platform Path, so Windows prints it with backslashes + String unix = "unix:" + Paths.get("/tmp/foo-0123456.socket"); + SocketAddress address = SocketFamily.fromString(unix); assertEquals(SocketFamily.unix, SocketFamily.familyOf(address)); - assertEquals("unix:/tmp/foo-0123456.socket", SocketFamily.toString(address)); + assertEquals(unix, SocketFamily.toString(address)); } }
