Terracotta-OSS / terracotta-platform

http://terracotta.org
Apache License 2.0
32 stars 48 forks source link

TDB-5673 DC fixes for Java 17 InetSocketAddress #1115

Closed tmesic99 closed 1 year ago

tmesic99 commented 2 years ago

These changes implement a fix for the new behavior of InetSocketAddress.toString() introduced by Java 17.
Basically, throughout platform, instances of the host:port string is derived from InetSocketAddress.toString(). With the new Java 17 behavior, toString() can now generate values as host\unresolved:port. This causes DC tests to fail on asserts. As well, DC console logging will confuse the user with this new 'unresolved' text.

This approach creates a new HostPort type to be used internally throughout the Platform modules. Interfacing with external libraries that require InetSocketAddress is supported through HostPort's conversion to/from InetSocketAddress.

mathieucarbou commented 1 year ago

Note: converted the PR to draft, which is better than [DO NOT MERGE] ...