Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc: i18n MessageSource example code bug [SPR-14003] #18575

Closed
spring-issuemaster opened this issue Feb 29, 2016 · 0 comments
Closed

Doc: i18n MessageSource example code bug [SPR-14003] #18575

spring-issuemaster opened this issue Feb 29, 2016 · 0 comments

Comments

@spring-issuemaster
Copy link
Collaborator

@spring-issuemaster spring-issuemaster commented Feb 29, 2016

Andrey opened SPR-14003 and commented

Paragraph 6.15.1 of a core documentation contains the following snippets that illustrate the way Spring resolves messages, replacing placeholders:

1. in exceptions.properties
argument.required=The '{0}' argument is required.
this.messages.getMessage("argument.required",
            new Object [] {"userDao"}, "Required", null);

However this code doesn't work with JDK1.8.0_45 due to the single quotes in the resource string, it should either be

argument.required=The ''{0}'' argument is required.

or

argument.required=The {0} argument is required.

Affects: 3.2.16, 4.2.4

Backported to: 3.2.17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.