[MAGNOLIA-6147] DefinitionProviderImpl.get() doesn't satisfy its contract Created: 26/Mar/15 Updated: 15/Apr/15 Resolved: 26/Mar/15 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.4 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Magnolia International | Assignee: | Magnolia International |
| Resolution: | Fixed | 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
|
||||||||||||
| Description |
|
The interface of DefinitionProvider tells us:
/**
* Returns the underlying bean if and only if it is successfully resolved, is valid, and is enabled.
*
* @throws Registry.InvalidDefinitionException (which is a RuntimeException) if the underlying bean is not successfully resolved, not valid, or not enabled.
*/
T get() throws Registry.InvalidDefinitionException;
However, info.magnolia.config.registry.DefinitionProviderBuilder.DefinitionProviderImpl does none of that. |
| Comments |
| Comment by Magnolia International [ 26/Mar/15 ] |
|
Simply checking for isValid() since all necessary checks have been done when assigning the boolean. |