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

ResourceResolver and MessageSource look very redundant #7

Open
keilw opened this issue Dec 7, 2015 · 2 comments
Open

ResourceResolver and MessageSource look very redundant #7

keilw opened this issue Dec 7, 2015 · 2 comments

Comments

@keilw
Copy link

keilw commented Dec 7, 2015

With generic signatures in ResourceResolver, it and MessageSource feel almost identical.
It could be more efficient to have ResourceResolver< String > or at most a MessageSource (or MessageResource ;-) simply extend ResourceResolver< String > providing extra methods like asResourceBundle().

@hendrikebbers
Copy link
Member

+1
I think it's ok to call "String myMessage = source.resolveResource("dialog.title", myLocal)" instead of "String myMessage = source.getMessage("dialog.title", myLocal)" since a text/message is a resource, too.

@aalmiray
Copy link
Member

aalmiray commented Dec 7, 2015

True, they look very similar but MessageSource has a narrower contract than ResourceResolver (it does not need the Converted assisted methods). Also, ResourceResolver cannot be generified to a single type (see #6)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants