Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/617#discussion_r30502327
  
    --- Diff: core/src/main/java/brooklyn/catalog/internal/CatalogDo.java ---
    @@ -254,8 +270,10 @@ CatalogDo addCatalog(CatalogDto child) {
         public synchronized void addToClasspath(String ...urls) {
             if (dto.classpath == null)
                 dto.classpath = new CatalogClasspathDto();
    -        for (String url: urls)
    -            dto.classpath.addEntry(url);
    +        for (String url: urls) {
    +            if (url!=null)
    --- End diff --
    
    Let's hope we never hit this with `url == null`. I'd expect (at least some 
times) that will be caused by a programming error or missing resource, which we 
should tell the caller. This code will now ignore (without any indication to 
the user).
    
    This relates to a more general discussion of how we should handle nulls. I 
think we should avoid nulls where feasible and accept them where required (e.g. 
getAttribute() and getConfig() can always return null). But I don't feel 
strongly enough to say more at this time!


---
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