brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tbou...@apache.org
Subject [1/3] brooklyn-library git commit: Fix use of deprecated code
Date Fri, 13 Oct 2017 14:00:48 GMT
Repository: brooklyn-library
Updated Branches:
  refs/heads/master bd17aea7f -> 185ed9fe6


Fix use of deprecated code

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

Branch: refs/heads/master
Commit: 50331ca8395ad6a3a1748b15336720e61b925158
Parents: bd17aea
Author: Aled Sage <aled.sage@gmail.com>
Authored: Tue Oct 10 09:04:11 2017 +0100
Committer: Aled Sage <aled.sage@gmail.com>
Committed: Tue Oct 10 09:04:11 2017 +0100

----------------------------------------------------------------------
 .../org/apache/brooklyn/entity/chef/ChefAttributeFeed.java     | 6 +++---
 .../brooklyn/entity/chef/ChefLifecycleEffectorTasks.java       | 1 -
 .../java/org/apache/brooklyn/entity/chef/ChefServerTasks.java  | 2 +-
 .../org/apache/brooklyn/entity/proxy/nginx/NginxSshDriver.java | 4 ++--
 4 files changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/50331ca8/software/cm/chef/src/main/java/org/apache/brooklyn/entity/chef/ChefAttributeFeed.java
----------------------------------------------------------------------
diff --git a/software/cm/chef/src/main/java/org/apache/brooklyn/entity/chef/ChefAttributeFeed.java
b/software/cm/chef/src/main/java/org/apache/brooklyn/entity/chef/ChefAttributeFeed.java
index f6d2615..91c9b09 100644
--- a/software/cm/chef/src/main/java/org/apache/brooklyn/entity/chef/ChefAttributeFeed.java
+++ b/software/cm/chef/src/main/java/org/apache/brooklyn/entity/chef/ChefAttributeFeed.java
@@ -194,8 +194,8 @@ public class ChefAttributeFeed extends AbstractFeed {
     }
     
     protected ChefAttributeFeed(Builder builder) {
-        setConfig(ONLY_IF_SERVICE_UP, builder.onlyIfServiceUp);
-        setConfig(NODE_NAME, checkNotNull(builder.nodeName, "builder.nodeName"));
+        config().set(ONLY_IF_SERVICE_UP, builder.onlyIfServiceUp);
+        config().set(NODE_NAME, checkNotNull(builder.nodeName, "builder.nodeName"));
 
         Set<ChefAttributePollConfig<?>> polls = Sets.newLinkedHashSet();
         for (ChefAttributePollConfig<?> config : builder.polls) {
@@ -205,7 +205,7 @@ public class ChefAttributeFeed extends AbstractFeed {
             if (configCopy.getPeriod() < 0) configCopy.period(builder.period);
             polls.add(configCopy);
         }
-        setConfig(POLLS, polls);
+        config().set(POLLS, polls);
         initUniqueTag(builder.uniqueTag, polls);
     }
 

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/50331ca8/software/cm/chef/src/main/java/org/apache/brooklyn/entity/chef/ChefLifecycleEffectorTasks.java
----------------------------------------------------------------------
diff --git a/software/cm/chef/src/main/java/org/apache/brooklyn/entity/chef/ChefLifecycleEffectorTasks.java
b/software/cm/chef/src/main/java/org/apache/brooklyn/entity/chef/ChefLifecycleEffectorTasks.java
index 8c3dad9..a142de4 100644
--- a/software/cm/chef/src/main/java/org/apache/brooklyn/entity/chef/ChefLifecycleEffectorTasks.java
+++ b/software/cm/chef/src/main/java/org/apache/brooklyn/entity/chef/ChefLifecycleEffectorTasks.java
@@ -20,7 +20,6 @@ package org.apache.brooklyn.entity.chef;
 
 import java.util.Collection;
 import java.util.Map;
-import java.util.concurrent.atomic.AtomicReference;
 
 import org.apache.brooklyn.api.entity.Entity;
 import org.apache.brooklyn.api.location.MachineLocation;

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/50331ca8/software/cm/chef/src/main/java/org/apache/brooklyn/entity/chef/ChefServerTasks.java
----------------------------------------------------------------------
diff --git a/software/cm/chef/src/main/java/org/apache/brooklyn/entity/chef/ChefServerTasks.java
b/software/cm/chef/src/main/java/org/apache/brooklyn/entity/chef/ChefServerTasks.java
index c81ff9d..af0c813 100644
--- a/software/cm/chef/src/main/java/org/apache/brooklyn/entity/chef/ChefServerTasks.java
+++ b/software/cm/chef/src/main/java/org/apache/brooklyn/entity/chef/ChefServerTasks.java
@@ -51,7 +51,7 @@ public class ChefServerTasks {
         if (data==null) return null;
         try {
             f.deleteOnExit();
-            Files.write(SecureKeys.stringPem(data), f, Charset.defaultCharset());
+            Files.write(SecureKeys.toPem(data), f, Charset.defaultCharset());
             return f;
         } catch (IOException e) {
             throw Throwables.propagate(e);

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/50331ca8/software/webapp/src/main/java/org/apache/brooklyn/entity/proxy/nginx/NginxSshDriver.java
----------------------------------------------------------------------
diff --git a/software/webapp/src/main/java/org/apache/brooklyn/entity/proxy/nginx/NginxSshDriver.java
b/software/webapp/src/main/java/org/apache/brooklyn/entity/proxy/nginx/NginxSshDriver.java
index 222891e..b8366a9 100644
--- a/software/webapp/src/main/java/org/apache/brooklyn/entity/proxy/nginx/NginxSshDriver.java
+++ b/software/webapp/src/main/java/org/apache/brooklyn/entity/proxy/nginx/NginxSshDriver.java
@@ -118,10 +118,10 @@ public class NginxSshDriver extends AbstractSoftwareProcessSshDriver
implements
         entity.sensors().set(NginxController.PID_FILE, getRunDir() + "/" + AbstractSoftwareProcessSshDriver.PID_FILENAME);
         if (((AbstractController)entity).isSsl()) {
             entity.sensors().set(Attributes.HTTPS_PORT, getPort());
-            ((EntityInternal)entity).removeAttribute(Attributes.HTTP_PORT);
+            ((EntityInternal)entity).sensors().remove(Attributes.HTTP_PORT);
         } else {
             entity.sensors().set(Attributes.HTTP_PORT, getPort());
-            ((EntityInternal)entity).removeAttribute(Attributes.HTTPS_PORT);
+            ((EntityInternal)entity).sensors().remove(Attributes.HTTPS_PORT);
         }
         super.postLaunch();
     }


Mime
View raw message