brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [02/50] brooklyn-library git commit: Deprecate LanguageUtils
Date Mon, 01 Feb 2016 17:46:20 GMT
Deprecate LanguageUtils

- brooklyn.util.internal.LanguageUtils is a groovy class
- Did some very minor cleanup, and deprecated it
  so we are free to completely change it in 0.6!

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

Branch: refs/heads/0.5.0
Commit: a5c52c081b6df641708f8ca9efbed4abf4b02bea
Parents: fde9b49
Author: Aled Sage <aled.sage@gmail.com>
Authored: Wed Mar 27 08:19:34 2013 +0000
Committer: Aled Sage <aled.sage@gmail.com>
Committed: Wed Mar 27 08:19:34 2013 +0000

----------------------------------------------------------------------
 .../brooklyn/mgmt/federated/FederatingManagementContext.groovy | 3 ++-
 sandbox/mgmt/src/test/java/example/infinispan/OneA.groovy      | 2 --
 .../brooklyn/entity/osgi/karaf/KarafContainerEc2LiveTest.java  | 4 ++--
 .../java/brooklyn/entity/osgi/karaf/KarafContainerTest.groovy  | 6 +++---
 4 files changed, 7 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/a5c52c08/sandbox/mgmt/src/main/java/brooklyn/mgmt/federated/FederatingManagementContext.groovy
----------------------------------------------------------------------
diff --git a/sandbox/mgmt/src/main/java/brooklyn/mgmt/federated/FederatingManagementContext.groovy
b/sandbox/mgmt/src/main/java/brooklyn/mgmt/federated/FederatingManagementContext.groovy
index 7623f0a..c85f8d1 100644
--- a/sandbox/mgmt/src/main/java/brooklyn/mgmt/federated/FederatingManagementContext.groovy
+++ b/sandbox/mgmt/src/main/java/brooklyn/mgmt/federated/FederatingManagementContext.groovy
@@ -21,6 +21,7 @@ import brooklyn.management.internal.AbstractManagementContext
 import brooklyn.management.internal.CollectionChangeListener
 import brooklyn.management.internal.LocalManagementContext
 import brooklyn.util.internal.LanguageUtils
+import brooklyn.util.text.Identifiers
 
 public class FederatingManagementContext extends AbstractManagementContext {
     
@@ -84,7 +85,7 @@ public class FederatingManagementContext extends AbstractManagementContext
{
     public EntityManager getEntityManager() { return rem.getContext().getEntityManager();
}
     
     public void onApplicationStart(Application app) {
-        String remoteNodeUid = LanguageUtils.newUid();
+        String remoteNodeUid = Identifiers.makeRandomId(8);
         c.addListener(new NodeStartListener());
         c.put(remoteNodeUid, BrooklynManagementNode.WELCOME_MESSAGE);
         

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/a5c52c08/sandbox/mgmt/src/test/java/example/infinispan/OneA.groovy
----------------------------------------------------------------------
diff --git a/sandbox/mgmt/src/test/java/example/infinispan/OneA.groovy b/sandbox/mgmt/src/test/java/example/infinispan/OneA.groovy
index 3e090be..59c87fe 100644
--- a/sandbox/mgmt/src/test/java/example/infinispan/OneA.groovy
+++ b/sandbox/mgmt/src/test/java/example/infinispan/OneA.groovy
@@ -6,8 +6,6 @@ import org.infinispan.config.GlobalConfiguration
 import org.infinispan.manager.DefaultCacheManager
 import org.infinispan.manager.EmbeddedCacheManager
 
-import brooklyn.util.internal.LanguageUtils;
-
 public class OneA {
     
     public static void main(String[] args) throws Exception {

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/a5c52c08/software/osgi/src/test/java/brooklyn/entity/osgi/karaf/KarafContainerEc2LiveTest.java
----------------------------------------------------------------------
diff --git a/software/osgi/src/test/java/brooklyn/entity/osgi/karaf/KarafContainerEc2LiveTest.java
b/software/osgi/src/test/java/brooklyn/entity/osgi/karaf/KarafContainerEc2LiveTest.java
index dda06b2..0cd3d27 100644
--- a/software/osgi/src/test/java/brooklyn/entity/osgi/karaf/KarafContainerEc2LiveTest.java
+++ b/software/osgi/src/test/java/brooklyn/entity/osgi/karaf/KarafContainerEc2LiveTest.java
@@ -8,7 +8,7 @@ import brooklyn.entity.AbstractEc2LiveTest;
 import brooklyn.entity.proxying.EntitySpecs;
 import brooklyn.location.Location;
 import brooklyn.test.EntityTestUtils;
-import brooklyn.util.internal.LanguageUtils;
+import brooklyn.util.text.Identifiers;
 
 import com.google.common.collect.ImmutableList;
 
@@ -20,7 +20,7 @@ public class KarafContainerEc2LiveTest extends AbstractEc2LiveTest {
     @Override
     protected void doTest(Location loc) throws Exception {
         KarafContainer karaf = app.createAndManageChild(EntitySpecs.spec(KarafContainer.class)
-                .configure("name", LanguageUtils.newUid())
+                .configure("name", Identifiers.makeRandomId(8))
                 .configure("displayName", "Karaf Test")
                 .configure("jmxPort", "8099+")
                 .configure("rmiServerPort", "9099+"));

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/a5c52c08/software/osgi/src/test/java/brooklyn/entity/osgi/karaf/KarafContainerTest.groovy
----------------------------------------------------------------------
diff --git a/software/osgi/src/test/java/brooklyn/entity/osgi/karaf/KarafContainerTest.groovy
b/software/osgi/src/test/java/brooklyn/entity/osgi/karaf/KarafContainerTest.groovy
index e046a0f..a30e699 100644
--- a/software/osgi/src/test/java/brooklyn/entity/osgi/karaf/KarafContainerTest.groovy
+++ b/software/osgi/src/test/java/brooklyn/entity/osgi/karaf/KarafContainerTest.groovy
@@ -17,8 +17,8 @@ import brooklyn.entity.trait.Startable
 import brooklyn.location.MachineProvisioningLocation
 import brooklyn.location.basic.LocalhostMachineProvisioningLocation
 import brooklyn.test.entity.TestApplication
-import brooklyn.util.internal.LanguageUtils
 import brooklyn.util.internal.TimeExtras
+import brooklyn.util.text.Identifiers
 
 public class KarafContainerTest {
     static { TimeExtras.init() }
@@ -42,7 +42,7 @@ public class KarafContainerTest {
     @Test(groups = ["Integration", "WIP"])
     public void canStartupAndShutdown() {
         karaf = app.createAndManageChild(EntitySpecs.spec(KarafContainer.class)
-                .configure("name", LanguageUtils.newUid())
+                .configure("name", Identifiers.makeRandomId(8))
                 .configure("displayName", "Karaf Test")
                 .configure("jmxPort", "8099+")
                 .configure("rmiServerPort", "9099+"));
@@ -64,7 +64,7 @@ public class KarafContainerTest {
     @Test(groups = ["Integration", "WIP"])
     public void testCanInstallAndUninstallBundle() {
         karaf = app.createAndManageChild(EntitySpecs.spec(KarafContainer.class)
-            .configure("name", LanguageUtils.newUid())
+            .configure("name", Identifiers.makeRandomId(8))
             .configure("displayName", "Karaf Test")
             .configure("jmxPort", "8099+")
             .configure("rmiServerPort", "9099+"));


Mime
View raw message