-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix logging IP version 6 addresses with scope in RediscoveryImpl
The `Inet6Address.getHostAddress()` returns a string with `%scope-id` in the end if it is scoped. For instance, `fe80:0:0:0:ce66:1564:db8q:94b6%6`. The `RediscoveryImpl` error handling logic used to construct a log message with such address that it would log using the `Logger.warn(String, Object...)` method. However, some implementations of the `Logger` interface supply the values given directly to the `String.format(String, Object...)` method. In those cases, the precense of the `%6` part in the log message string results in a `java.util.UnknownFormatConversionException: Conversion = '6'` exception. This update fixed this issue by supplying the address separately, thus letting the logging implementations to do the formatting.
- Loading branch information
1 parent
2660b23
commit 4b8ec49
Showing
2 changed files
with
36 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters