brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grkvlt <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: Some further tidies in wake of la...
Date Sat, 11 Oct 2014 20:00:49 GMT
Github user grkvlt commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/233#discussion_r18744011
  
    --- Diff: core/src/main/java/brooklyn/location/basic/BasicLocationRegistry.java ---
    @@ -190,52 +194,58 @@ void disablePersistence() {
             // defining the format and file etc)
         }
     
    -    BasicLocationDefinition localhost(String id) {
    +    static BasicLocationDefinition localhost(String id) {
             return new BasicLocationDefinition(id, "localhost", "localhost", null);
         }
         
         /** to catch circular references */
         protected ThreadLocal<Set<String>> specsSeen = new ThreadLocal<Set<String>>();
         
    -    @Override
    +    @Override @Deprecated
         public boolean canMaybeResolve(String spec) {
             return getSpecResolver(spec) != null;
         }
     
         @Override
         public final Location resolve(String spec) {
    -        return resolve(spec, new MutableMap());
    +        return resolve(spec, true, null).get();
         }
         
    -    @Override
    +    @Override @Deprecated
         public final Location resolveIfPossible(String spec) {
             if (!canMaybeResolve(spec)) return null;
    -        try {
    -            return resolve(spec);
    -        } catch (Exception e) {
    -            if (log.isTraceEnabled())
    -                log.trace("Unable to resolve "+spec+": "+e, e);
    -            // can't resolve
    -            return null;
    -        }
    +        return resolve(spec, null, null).orNull();
         }
    -
    -    @Override
    -    public Location resolve(String spec, Map locationFlags) {
    +    
    +    @Deprecated /** since 0.7.0 not used */
    +    public Maybe<Location> resolve(String spec, boolean manage) {
    +        return resolve(spec, manage, null);
    +    }
    +    
    +    public Maybe<Location> resolve(String spec, Boolean manage, Map locationFlags)
{
    --- End diff --
    
    What is the rationale behind the `final`-ness or not of the resolve methods?


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

Mime
View raw message