I have code:
messageSource.getMessage("some.key",new Object[]{30,31},Constants.LOCALE)
and key inside property file:
some.key=Csv header length ({0}) doesn't correspond the mapping file size {1} .
but result is strange:
Csv header length (30) doesn't correspond the mapping file size {1} .
Fisrt variable was successfully replaced but second - not.
Why does second argument was not resolved?
The problem is because you have a single quote in the message that you have not escaped.
See https://www.mscharhag.com/java/resource-bundle-single-quote-escaping for an example of your problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With