Merge remote-tracking branch 'aledsage/tidy/logging-cleanup'

Conflicts:
        core/src/main/java/brooklyn/event/adapter/ConfigSensorAdapter.groovy - 
whitespace only


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

Branch: refs/heads/0.4.0
Commit: de3cb11288618f1707fd09c86b334233080d8c61
Parents: 2dcf8a2 0b2a3fa
Author: Alex Heneveld <[email protected]>
Authored: Thu Oct 11 20:07:07 2012 +0100
Committer: Alex Heneveld <[email protected]>
Committed: Thu Oct 11 20:07:07 2012 +0100

----------------------------------------------------------------------
 .../brooklyn/entity/basic/AbstractEntity.groovy |  9 +++-
 .../brooklyn/entity/group/DynamicCluster.java   |  3 +-
 .../event/adapter/ConfigSensorAdapter.groovy    | 32 ++++++-------
 .../event/adapter/HttpPollHelper.groovy         |  5 +--
 .../location/basic/SshMachineLocation.java      |  4 +-
 .../location/geo/MaxMindHostGeoLookup.java      |  2 +-
 .../internal/LocalManagementContext.java        | 23 ++++++----
 .../internal/LocalSubscriptionManager.java      | 18 +++++---
 .../java/brooklyn/util/internal/Repeater.groovy | 18 ++++++--
 .../brooklyn/util/internal/ssh/SshjTool.java    | 20 ++++-----
 .../java/brooklyn/util/text/Identifiers.java    | 14 +++++-
 .../event/adapter/HttpSensorAdapterTest.groovy  | 47 ++++++++++++++++----
 .../entity/basic/SoftwareProcessEntity.groovy   | 19 ++++----
 .../entity/basic/lifecycle/ScriptHelper.java    | 11 ++---
 14 files changed, 148 insertions(+), 77 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/de3cb112/core/src/main/java/brooklyn/event/adapter/ConfigSensorAdapter.groovy
----------------------------------------------------------------------
diff --cc core/src/main/java/brooklyn/event/adapter/ConfigSensorAdapter.groovy
index 4b93f4c,5d243a1..c9571ad
--- a/core/src/main/java/brooklyn/event/adapter/ConfigSensorAdapter.groovy
+++ b/core/src/main/java/brooklyn/event/adapter/ConfigSensorAdapter.groovy
@@@ -10,24 -10,24 +10,24 @@@ import brooklyn.event.basic.AttributeSe
  @InheritConstructors
  public class ConfigSensorAdapter extends AbstractSensorAdapter {
  
--      void register(SensorRegistry registry) {
--              super.register(registry)
--              addActivationLifecycleListeners({ apply() }, {})
--      }
--      
--      public void apply() {
--              apply(entity)
--      }
--      
--      //normally just applied once, statically, not registered...
--      public static void apply(EntityLocal entity) {
--              for (Sensor it : entity.getEntityType().getSensors()) {
--                      if (it in AttributeSensorAndConfigKey && 
entity.getAttribute(it)==null) {
++    void register(SensorRegistry registry) {
++        super.register(registry)
++        addActivationLifecycleListeners({ apply() }, {})
++    }
++
++    public void apply() {
++        apply(entity)
++    }
++
++    //normally just applied once, statically, not registered...
++    public static void apply(EntityLocal entity) {
++        for (Sensor it : entity.getEntityType().getSensors()) {
++            if (it in AttributeSensorAndConfigKey && 
entity.getAttribute(it)==null) {
                  entity.setAttribute(it)
--                      }
++            }
          }
--      }
-     
 -      
++    }
++
      //for selectively applying once (e.g. sub-classes of DynamicWebAppCluster 
that don't want to set HTTP_PORT etc!)
      public static void apply(EntityLocal entity, AttributeSensorAndConfigKey 
key) {
          if (entity.getAttribute(key)==null) {

Reply via email to