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

    https://github.com/apache/brooklyn-server/pull/338#discussion_r112694452
  
    --- Diff: 
api/src/main/java/org/apache/brooklyn/api/internal/AbstractBrooklynObjectSpec.java
 ---
    @@ -91,26 +96,39 @@ public String toString() {
         }
     
         protected abstract void checkValidType(Class<? extends T> type);
    -    
    +
         public SpecT displayName(String val) {
             displayName = val;
             return self();
         }
    -    
    -    /** Set the catalog item ID that defined this object, also used for 
searching for type and resources referenced */
    -    // since https://issues.apache.org/jira/browse/BROOKLYN-445 this must 
no longer be used to indicate
    -    // a caller-context catalog item that should be used for search 
purposes;
    -    // if that behaviour is desired, the child should be refactored to be 
its own item in the catalog BOM
    -    // (or TODO we add a separate field to record other catalog item IDs 
that could be applied for searching, see below)
    +
    +    /**
    +     * Set the catalog item ID that defined this object;
    +     * since https://issues.apache.org/jira/browse/BROOKLYN-445 this must 
no longer be used to indicate
    +     * a caller-context catalog item that should be used for search 
purposes;
    +     * instead use {@link #catalogItemIdAndSearchPath}.
    +     */
         public SpecT catalogItemId(String val) {
             catalogItemId = val;
             return self();
         }
    -    // TODO in many places (callers to this method) we prefer a wrapper 
item ID;
    -    // that is right, because the wrapper's defn will refer to the wrapped,
    -    // but we might need also to collect the item ID's so that *all* can 
be searched, see #catalogItemId.
    -    // e.g. if R3 references R2 which references R1 any one of these might 
supply config keys 
    -    // referencing resources or types in their local bundles. 
    +
    +    /**
    +     * Set the immediate catalog item ID of this object, and the search 
path of other catalog items used to define it.
    +     */
    +    public synchronized SpecT catalogItemIdAndSearchPath(String 
catalogItemId, Collection<String> searchPath) {
    +        if (catalogItemId != null) {
    --- End diff --
    
    what is the reason for this behaviour on null?  ignoring searchPath seems 
weird.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to