brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From geom...@apache.org
Subject [1/2] brooklyn-library git commit: Fix generics usage (for compilation in Eclipse)
Date Mon, 22 May 2017 14:13:39 GMT
Repository: brooklyn-library
Updated Branches:
  refs/heads/master 2ea4732a7 -> 2ce0f426b


Fix generics usage (for compilation in Eclipse)

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

Branch: refs/heads/master
Commit: b15672c6198322039481b306cae0904a06514495
Parents: 2ea4732
Author: Aled Sage <aled.sage@gmail.com>
Authored: Mon May 22 14:47:02 2017 +0100
Committer: Aled Sage <aled.sage@gmail.com>
Committed: Mon May 22 14:47:02 2017 +0100

----------------------------------------------------------------------
 .../apache/brooklyn/entity/database/mysql/MySqlClusterImpl.java  | 4 ++--
 .../brooklyn/entity/nosql/cassandra/CassandraDatacenterImpl.java | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/b15672c6/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlClusterImpl.java
----------------------------------------------------------------------
diff --git a/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlClusterImpl.java
b/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlClusterImpl.java
index cbc0272..e0314ab 100644
--- a/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlClusterImpl.java
+++ b/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlClusterImpl.java
@@ -134,11 +134,11 @@ public class MySqlClusterImpl extends DynamicClusterImpl implements
MySqlCluster
                 .build());
     }
 
-    private void propagateMasterAttribute(AttributeSensor<?> att) {
+    private <T> void propagateMasterAttribute(AttributeSensor<T> att) {
         enrichers().add(Enrichers.builder()
                 .aggregating(att)
                 .publishing(att)
-                .computing(IfFunctions.ifPredicate(CollectionFunctionals.notEmpty())
+                .computing(IfFunctions.<Collection<T>>ifPredicate(CollectionFunctionals.notEmpty())
                         .apply(CollectionFunctionals.firstElement())
                         .defaultValue(null))
                 .entityFilter(MySqlClusterUtils.IS_MASTER)

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/b15672c6/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraDatacenterImpl.java
----------------------------------------------------------------------
diff --git a/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraDatacenterImpl.java
b/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraDatacenterImpl.java
index 79003c2..5322c22 100644
--- a/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraDatacenterImpl.java
+++ b/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/cassandra/CassandraDatacenterImpl.java
@@ -336,7 +336,8 @@ public class CassandraDatacenterImpl extends DynamicClusterImpl implements
Cassa
     protected Entity replaceMember(Entity member, Location memberLoc, Map<?, ?> extraFlags)
{
         Set<BigInteger> oldTokens = ((CassandraNode) member).getTokens();
         Set<BigInteger> newTokens = (oldTokens != null && oldTokens.size()
> 0) ? getTokenGenerator().getTokensForReplacementNode(oldTokens) : null;
-        return super.replaceMember(member, memberLoc,  MutableMap.copyOf(extraFlags).add(CassandraNode.TOKENS,
newTokens));
+        MutableMap<Object, Object> allFlags = MutableMap.<Object, Object>copyOf(extraFlags).add(CassandraNode.TOKENS,
newTokens);
+        return super.replaceMember(member, memberLoc, allFlags);
     }
 
     @Override


Mime
View raw message