brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahgittin <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: Minor misc tidies
Date Mon, 25 Aug 2014 06:34:01 GMT
Github user ahgittin commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/113#discussion_r16643541
  
    --- Diff: core/src/main/java/brooklyn/config/BrooklynProperties.java ---
    @@ -72,17 +72,46 @@ public static BrooklynProperties newEmpty() {
             /** creates a new {@link BrooklynProperties} with contents loaded 
              * from the usual places, including *.properties files and environment variables
*/
             public static BrooklynProperties newDefault() {
    -            return new Builder().build();
    +            return new Builder(true).build();
    +        }
    +
    +        public static Builder builderDefault() {
    +            return new Builder(true);
    +        }
    +
    +        public static Builder builderEmpty() {
    +            return new Builder(true);
             }
     
             public static class Builder {
    -            private String defaultLocationMetadataUrl = "classpath://brooklyn/location-metadata.properties";
    -            private String globalLocationMetadataFile = Os.mergePaths(Os.home(), ".brooklyn",
"location-metadata.properties");
    -            private String globalPropertiesFile = Os.mergePaths(Os.home(), ".brooklyn",
"brooklyn.properties");
    +            private String defaultLocationMetadataUrl;
    +            private String globalLocationMetadataFile = null;
    +            private String globalPropertiesFile = null;
                 private String localPropertiesFile = null;
                 private BrooklynProperties originalProperties = null;
                 
    -            public Builder(){}
    +            /** @deprecated since 0.7.0 use static methods in {@link Factory} to create
*/
    +            public Builder() {
    +                this(true);
    +            }
    +            
    +            private Builder(boolean setGlobalFileDefaults) {
    --- End diff --
    
    you're probably right -- have added comment, it's private so easy to clean up once we've
used the factory methods for a while


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