[MAGNOLIA-5174] Change scope of MessagesWrapper from package-private to public. Created: 10/Jul/13 Updated: 10/Jul/13 Resolved: 10/Jul/13 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | 4.5.8 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Robert Šiška | Assignee: | Robert Šiška |
| Resolution: | Not an issue | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Template: |
|
||||
| Acceptance criteria: |
Empty
|
||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||
| Date of First Response: | |||||
| Description |
|
The constructor info.magnolia.freemarker.MessagesWrapper.MessagesWrapper is accessible only from package info.magnolia.freemarker |
| Comments |
| Comment by Magnolia International [ 10/Jul/13 ] |
|
This is done to avoid instantiating this class outside its package, i.e outside where it's currently instantiated. Making the constructor public, or putting your own classes in a same-but-different (same name, different location) is NOT a solution (the former adds maintenance burden on this class, as well as on whatever client code uses it; the latter won't work in more restricted environment where the code's location is checked - some classloaders prevent a same package to come from different locations) If we knew the actual use-case, it'd be as easy to come up with a fix that makes it possible (I'm assuming some FreemarkerHelper/Renderer is involved, as well as lots of copy-pasting - whereas we could extract a couple of methods to help realize the use-case more elegantly and more maintainably) |