Github user ahgittin commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/356#issuecomment-72013306
  
    @sjcorbett i still think it is too confusing having `nonNull()` verified at 
deployment time for entities.  people routinely set config early in the start 
sequence but after deployment. if the `EntityFactory` check were remove i think 
we'd be fine, and we are clear that the meaning of `nonNull` is that a 
`get(key)` call never returns null.
    
    i'm okay with merging it once the deploy-time check is removed.  (that 
could be refactored to a utility method available on demand.)
    
    however if you have bandwidth or there is not a pressing need for this now 
my preference would still be to apply a `ConfigValidation` scheme instead of 
this impl, and to do this now rather than introduce the api proposed here which 
i think we'll deprecate.  a `ConfigValidation` scheme could have a 
`NON_NULL_ON_DEPLOY` or `NON_NULL_ON_USE` and we can cleanly do deploy-time 
checks.  it could then be expanded with things like `MATCHES_REGEX` and 
`IN_RANGE` etc.
    
    this could follow the `ConfigInheritance` pattern in 
https://github.com/apache/incubator-brooklyn/pull/483 .
    
    (with apologies for the delay in replying, and for the merge conflicts that 
are now present)



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to