UnknownFormatConversionException when string has '%' character
Opened this issue · 2 comments
javydreamercsw commented
In this case the string resolved to: atJ9GrtE%i
Here's the stack trace:
java.util.UnknownFormatConversionException: Conversion = 'i'
at java.base/java.util.Formatter$FormatSpecifier.conversion(Formatter.java:2839)
at java.base/java.util.Formatter$FormatSpecifier.<init>(Formatter.java:2865)
at java.base/java.util.Formatter.parse(Formatter.java:2713)
at java.base/java.util.Formatter.format(Formatter.java:2655)
at java.base/java.util.Formatter.format(Formatter.java:2609)
at java.base/java.lang.String.format(String.java:2897)
at org.aeonbits.owner.PropertiesInvocationHandler.format(PropertiesInvocationHandler.java:113)
at org.aeonbits.owner.PropertiesInvocationHandler.resolveProperty(PropertiesInvocationHandler.java:90)
at org.aeonbits.owner.PropertiesInvocationHandler.invoke(PropertiesInvocationHandler.java:67)
lviggiano commented
Hi.
Adding @DisableFeature({PARAMETER_FORMATTING})
on class level or method level should fix it.
This exception is the result of having parameter formatting, which is not a very useful feature, and I should set it disabled by default.
Hope this helps.
L
lviggiano commented
I keep the bug open so I won't forget to disable this feature by default on next release.
No ETA for next release: unfortunately I don't have very much time to dedicate to this project.