brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aleds...@apache.org
Subject [3/5] incubator-brooklyn git commit: - Change the radix to use MAX_RADIX value. - Character.MAX_RADIX value is 36 - Using Character.MAX_RADIX gives a 6-chars long string, instead of the previous 8-chars string when radix is 16
Date Fri, 28 Aug 2015 10:56:52 GMT
- Change the radix to use MAX_RADIX value.
- Character.MAX_RADIX value is 36
- Using Character.MAX_RADIX gives a 6-chars long string, instead of
  the previous 8-chars string when radix is 16

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

Branch: refs/heads/master
Commit: dee6481e5e96dcdb0f55b1baee5976a398b4b4c6
Parents: ed18f7c
Author: Yavor Yanchev <yavor@yanchev.com>
Authored: Fri Aug 28 11:10:43 2015 +0300
Committer: Yavor Yanchev <yavor@yanchev.com>
Committed: Fri Aug 28 11:57:38 2015 +0300

----------------------------------------------------------------------
 .../core/location/cloud/names/BasicCloudMachineNamer.java       | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/dee6481e/core/src/main/java/org/apache/brooklyn/core/location/cloud/names/BasicCloudMachineNamer.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/location/cloud/names/BasicCloudMachineNamer.java
b/core/src/main/java/org/apache/brooklyn/core/location/cloud/names/BasicCloudMachineNamer.java
index d6445c9..38ecbe5 100644
--- a/core/src/main/java/org/apache/brooklyn/core/location/cloud/names/BasicCloudMachineNamer.java
+++ b/core/src/main/java/org/apache/brooklyn/core/location/cloud/names/BasicCloudMachineNamer.java
@@ -22,7 +22,6 @@ import org.apache.brooklyn.api.entity.Application;
 import org.apache.brooklyn.api.entity.Entity;
 import org.apache.brooklyn.core.location.cloud.CloudLocationConfig;
 import org.apache.brooklyn.util.core.config.ConfigBag;
-import org.apache.brooklyn.util.text.Identifiers;
 import org.apache.brooklyn.util.text.StringShortener;
 import org.apache.brooklyn.util.text.Strings;
 
@@ -49,7 +48,7 @@ public class BasicCloudMachineNamer extends AbstractCloudMachineNamer {
          * It gives the possibility to search easily for instances, security groups, keypairs,
etc
          * based on timestamp without complicated enumeration        
          */ 
-        shortener.append("timeStamp", Long.toString(System.currentTimeMillis() / 1000L, 16));
+        shortener.append("timeStamp", Long.toString(System.currentTimeMillis() / 1000L, Character.MAX_RADIX));
         
         String user = System.getProperty("user.name");
         if (!"brooklyn".equals(user))
@@ -85,7 +84,7 @@ public class BasicCloudMachineNamer extends AbstractCloudMachineNamer {
                 .canTruncate("user", 4)
                 .canRemove("entity")
                 .canTruncate("context", 4)
-                .canTruncate("timeStamp", 8)
+                .canTruncate("timeStamp", 6)
                 .canRemove("user")
                 .canTruncate("appId", 2)
                 .canRemove("appId");


Mime
View raw message