brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [20/28] brooklyn-server git commit: align signature as per PR comment, and trivial deprecation/warning fixes
Date Wed, 15 Feb 2017 18:31:13 GMT
align signature as per PR comment, and trivial deprecation/warning fixes


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/b1b84434
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/b1b84434
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/b1b84434

Branch: refs/heads/master
Commit: b1b84434197f8d4c53fa9382630616227ff879b0
Parents: 6560e58
Author: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Authored: Mon Feb 13 17:08:49 2017 +0000
Committer: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Committed: Tue Feb 14 00:13:10 2017 +0000

----------------------------------------------------------------------
 .../brooklyn/api/internal/AbstractBrooklynObjectSpec.java | 10 +++++-----
 .../apache/brooklyn/core/entity/EntityTypeSnapshot.java   |  2 +-
 .../apache/brooklyn/core/objs/BrooklynDynamicType.java    |  4 ++--
 .../apache/brooklyn/core/objs/BrooklynTypeSnapshot.java   |  5 +++--
 4 files changed, 11 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/b1b84434/api/src/main/java/org/apache/brooklyn/api/internal/AbstractBrooklynObjectSpec.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/brooklyn/api/internal/AbstractBrooklynObjectSpec.java
b/api/src/main/java/org/apache/brooklyn/api/internal/AbstractBrooklynObjectSpec.java
index e21d765..e725885 100644
--- a/api/src/main/java/org/apache/brooklyn/api/internal/AbstractBrooklynObjectSpec.java
+++ b/api/src/main/java/org/apache/brooklyn/api/internal/AbstractBrooklynObjectSpec.java
@@ -22,7 +22,6 @@ import static com.google.common.base.Preconditions.checkNotNull;
 
 import java.io.Serializable;
 import java.lang.reflect.Modifier;
-import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
@@ -40,6 +39,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import com.google.common.annotations.Beta;
+import com.google.common.base.MoreObjects;
 import com.google.common.base.Objects;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableSet;
@@ -85,7 +85,7 @@ public abstract class AbstractBrooklynObjectSpec<T,SpecT extends AbstractBrookly
 
     @Override
     public String toString() {
-        return Objects.toStringHelper(this).omitNullValues()
+        return MoreObjects.toStringHelper(this).omitNullValues()
                 .add("type", type)
                 .add("displayName", displayName)
                 .toString();
@@ -150,12 +150,12 @@ public abstract class AbstractBrooklynObjectSpec<T,SpecT extends
AbstractBrookly
     
     // probably the thing to do is deprecate the ambiguous method in favour of an explicit
     @Beta
-    public SpecT parameters(List<? extends SpecParameter<?>> parameters) {
+    public SpecT parameters(Iterable<? extends SpecParameter<?>> parameters)
{
         return parametersReplace(parameters);
     }
     /** adds the given parameters, new ones first so they dominate subsequent ones */
     @Beta
-    public SpecT parametersAdd(List<? extends SpecParameter<?>> parameters) {
+    public SpecT parametersAdd(Iterable<? extends SpecParameter<?>> parameters)
{
         // parameters follows immutable pattern, unlike the other fields
         Set<SpecParameter<?>> params = MutableSet.<SpecParameter<?>>copyOf(parameters);
         Set<SpecParameter<?>> current = MutableSet.<SpecParameter<?>>copyOf(this.parameters);
@@ -168,7 +168,7 @@ public abstract class AbstractBrooklynObjectSpec<T,SpecT extends AbstractBrookly
     }
     /** replaces parameters with the given */
     @Beta
-    public SpecT parametersReplace(Collection<? extends SpecParameter<?>> parameters)
{
+    public SpecT parametersReplace(Iterable<? extends SpecParameter<?>> parameters)
{
         this.parameters = ImmutableList.copyOf(checkNotNull(parameters, "parameters"));
         return self();
     }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/b1b84434/core/src/main/java/org/apache/brooklyn/core/entity/EntityTypeSnapshot.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/entity/EntityTypeSnapshot.java b/core/src/main/java/org/apache/brooklyn/core/entity/EntityTypeSnapshot.java
index 50e99f7..25223f8 100644
--- a/core/src/main/java/org/apache/brooklyn/core/entity/EntityTypeSnapshot.java
+++ b/core/src/main/java/org/apache/brooklyn/core/entity/EntityTypeSnapshot.java
@@ -33,8 +33,8 @@ import org.apache.brooklyn.core.objs.BrooklynTypeSnapshot;
 import org.apache.brooklyn.util.guava.Maybe;
 
 import com.google.common.base.Joiner;
+import com.google.common.base.MoreObjects.ToStringHelper;
 import com.google.common.base.Objects;
-import com.google.common.base.Objects.ToStringHelper;
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableSet;
 

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/b1b84434/core/src/main/java/org/apache/brooklyn/core/objs/BrooklynDynamicType.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/objs/BrooklynDynamicType.java b/core/src/main/java/org/apache/brooklyn/core/objs/BrooklynDynamicType.java
index 3642448..680bf59 100644
--- a/core/src/main/java/org/apache/brooklyn/core/objs/BrooklynDynamicType.java
+++ b/core/src/main/java/org/apache/brooklyn/core/objs/BrooklynDynamicType.java
@@ -44,7 +44,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import com.google.common.base.Joiner;
-import com.google.common.base.Objects;
+import com.google.common.base.MoreObjects;
 import com.google.common.collect.ArrayListMultimap;
 import com.google.common.collect.ListMultimap;
 import com.google.common.collect.Lists;
@@ -253,7 +253,7 @@ public abstract class BrooklynDynamicType<T extends BrooklynObject,
AbstractT ex
         }
         @Override
         public String toString() {
-            return Objects.toStringHelper(this).add("field", field).add("value", value).toString();
+            return MoreObjects.toStringHelper(this).add("field", field).add("value", value).toString();
         }
     }
     

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/b1b84434/core/src/main/java/org/apache/brooklyn/core/objs/BrooklynTypeSnapshot.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/objs/BrooklynTypeSnapshot.java b/core/src/main/java/org/apache/brooklyn/core/objs/BrooklynTypeSnapshot.java
index 21cd299..77fcb11 100644
--- a/core/src/main/java/org/apache/brooklyn/core/objs/BrooklynTypeSnapshot.java
+++ b/core/src/main/java/org/apache/brooklyn/core/objs/BrooklynTypeSnapshot.java
@@ -25,8 +25,9 @@ import org.apache.brooklyn.api.objs.BrooklynType;
 import org.apache.brooklyn.config.ConfigKey;
 import org.apache.brooklyn.util.text.Strings;
 
+import com.google.common.base.MoreObjects;
+import com.google.common.base.MoreObjects.ToStringHelper;
 import com.google.common.base.Objects;
-import com.google.common.base.Objects.ToStringHelper;
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableSet;
 
@@ -95,7 +96,7 @@ public class BrooklynTypeSnapshot implements BrooklynType {
     }
     
     protected ToStringHelper toStringHelper() {
-        return Objects.toStringHelper(name)
+        return MoreObjects.toStringHelper(name)
                 .add("configKeys", configKeys);
     }
 }


Mime
View raw message