[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:
relation
is related to MAGNOLIA-6066 Create APIs for new registry, configu... Closed
is related to MAGNOLIA-6067 Implement base part of config module ... Closed
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.

Generated at Mon Feb 12 04:11:45 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.