brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [2/5] incubator-brooklyn git commit: Fix sum transformation lookup
Date Mon, 02 Nov 2015 16:08:46 GMT
Fix sum transformation lookup


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

Branch: refs/heads/master
Commit: e27a35aa4738a90ea4afe3215ea23378b3322089
Parents: 6d00890
Author: Mike Zaccardo <mike.zaccardo@cloudsoftcorp.com>
Authored: Fri Oct 30 12:55:20 2015 -0500
Committer: Mike Zaccardo <mike.zaccardo@cloudsoftcorp.com>
Committed: Fri Oct 30 12:55:20 2015 -0500

----------------------------------------------------------------------
 .../main/java/org/apache/brooklyn/enricher/stock/Aggregator.java  | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e27a35aa/core/src/main/java/org/apache/brooklyn/enricher/stock/Aggregator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/enricher/stock/Aggregator.java b/core/src/main/java/org/apache/brooklyn/enricher/stock/Aggregator.java
index 2892427..0e0e8cc 100644
--- a/core/src/main/java/org/apache/brooklyn/enricher/stock/Aggregator.java
+++ b/core/src/main/java/org/apache/brooklyn/enricher/stock/Aggregator.java
@@ -33,7 +33,6 @@ import org.apache.brooklyn.api.sensor.SensorEventListener;
 import org.apache.brooklyn.config.ConfigKey;
 import org.apache.brooklyn.core.BrooklynLogging;
 import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.enricher.stock.Enrichers.ComputingAverage;
 import org.apache.brooklyn.util.collections.MutableList;
 import org.apache.brooklyn.util.collections.MutableMap;
 import org.apache.brooklyn.util.core.flags.SetFromFlag;
@@ -103,7 +102,7 @@ public class Aggregator<T,U> extends AbstractAggregator<T,U>
implements SensorEv
     @SuppressWarnings({ "rawtypes", "unchecked" })
     protected Function<? super Collection<?>, ?> lookupTransformation(String
t1) {
         if ("average".equalsIgnoreCase(t1)) return new Enrichers.ComputingAverage(null, null,
targetSensor.getTypeToken());
-        if ("sum".equalsIgnoreCase(t1)) return new Enrichers.ComputingAverage(null, null,
targetSensor.getTypeToken());
+        if ("sum".equalsIgnoreCase(t1)) return new Enrichers.ComputingSum(null, null, targetSensor.getTypeToken());
         if ("list".equalsIgnoreCase(t1)) return new ComputingList();
         return null;
     }


Mime
View raw message