Terracotta-OSS / terracotta-platform

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

Further HostPort refactorings to decouple the parsing from the utility classes with the introduction of HostPort#parse methods #1129

Closed mathieucarbou closed 1 year ago

mathieucarbou commented 1 year ago

I was trying to use HostPort in some voter / config-tool refac.

Here are some further changes regarding HostPort to move the parse() methods to the HostPort class in order to avoid to deal with the utility class each time we parse a HostPort.

Note: I specifically changes the method names to break compatibility in order to change the client code accordingly, in order to be able to remove the default values set for the ports.

It is up to the caller to know which port fits.

2 flavors of parse methods now: