cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ko...@apache.org
Subject git commit: updated refs/heads/master to 6617187
Date Sun, 30 Mar 2014 08:32:32 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 6a9d6f879 -> 661718719


some String instantiations removed

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>


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

Branch: refs/heads/master
Commit: 66171871937d4494e2d49c49b7a3f741fae6a59d
Parents: 6a9d6f8
Author: Laszlo Hornyak <laszlo.hornyak@gmail.com>
Authored: Sun Mar 30 10:02:46 2014 +0200
Committer: Laszlo Hornyak <laszlo.hornyak@gmail.com>
Committed: Sun Mar 30 10:31:42 2014 +0200

----------------------------------------------------------------------
 .../bridge/service/EC2SoapServiceImpl.java      | 24 ++++++++++----------
 .../bridge/service/core/ec2/EC2Engine.java      |  6 ++---
 .../src/com/cloud/bridge/util/EC2RestAuth.java  |  2 +-
 3 files changed, 16 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/66171871/awsapi/src/com/cloud/bridge/service/EC2SoapServiceImpl.java
----------------------------------------------------------------------
diff --git a/awsapi/src/com/cloud/bridge/service/EC2SoapServiceImpl.java b/awsapi/src/com/cloud/bridge/service/EC2SoapServiceImpl.java
index d44f1d1..a1e8171 100644
--- a/awsapi/src/com/cloud/bridge/service/EC2SoapServiceImpl.java
+++ b/awsapi/src/com/cloud/bridge/service/EC2SoapServiceImpl.java
@@ -999,7 +999,7 @@ public class EC2SoapServiceImpl implements AmazonEC2SkeletonInterface
{
 
         if (null != fst) {
             String[] timeFilters = new String[1];
-            timeFilters[0] = new String("start-time");
+            timeFilters[0] = "start-time";
             request = toSnapshotFilterSet(request, fst, timeFilters);
         }
 
@@ -1035,8 +1035,8 @@ public class EC2SoapServiceImpl implements AmazonEC2SkeletonInterface
{
 
         if (null != fst) {
             String[] timeFilters = new String[2];
-            timeFilters[0] = new String("attachment.attach-time");
-            timeFilters[1] = new String("create-time");
+            timeFilters[0] = "attachment.attach-time";
+            timeFilters[1] = "create-time";
             request = toVolumeFilterSet(request, fst, timeFilters);
         }
 
@@ -2070,24 +2070,24 @@ public class EC2SoapServiceImpl implements AmazonEC2SkeletonInterface
{
 
     public static String toAmazonStateName(String cloudState) {
         if (null == cloudState)
-            return new String("terminated");
+            return "terminated";
 
         if (cloudState.equalsIgnoreCase("Destroyed"))
-            return new String("terminated");
+            return "terminated";
         else if (cloudState.equalsIgnoreCase("Stopped"))
-            return new String("stopped");
+            return "stopped";
         else if (cloudState.equalsIgnoreCase("Running"))
-            return new String("running");
+            return "running";
         else if (cloudState.equalsIgnoreCase("Starting"))
-            return new String("pending");
+            return "pending";
         else if (cloudState.equalsIgnoreCase("Stopping"))
-            return new String("stopping");
+            return "stopping";
         else if (cloudState.equalsIgnoreCase("Error"))
-            return new String("error");
+            return "error";
         else if (cloudState.equalsIgnoreCase("Expunging"))
-            return new String("terminated");
+            return "terminated";
         else
-            return new String("running");
+            return "running";
     }
 
     public static StopInstancesResponse toStopInstancesResponse(EC2StopInstancesResponse
engineResponse) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/66171871/awsapi/src/com/cloud/bridge/service/core/ec2/EC2Engine.java
----------------------------------------------------------------------
diff --git a/awsapi/src/com/cloud/bridge/service/core/ec2/EC2Engine.java b/awsapi/src/com/cloud/bridge/service/core/ec2/EC2Engine.java
index ef7539f..cd20214 100644
--- a/awsapi/src/com/cloud/bridge/service/core/ec2/EC2Engine.java
+++ b/awsapi/src/com/cloud/bridge/service/core/ec2/EC2Engine.java
@@ -2233,9 +2233,9 @@ public class EC2Engine extends ManagerBase {
             perm.setProtocol(rule.getProtocol());
             perm.setFromPort(rule.getStartPort());
             perm.setToPort(rule.getEndPort());
-            perm.setRuleId(rule.getRuleId() != null ? rule.getRuleId().toString() : new String());
-            perm.setIcmpCode(rule.getIcmpCode() != null ? rule.getIcmpCode().toString() :
new String());
-            perm.setIcmpType(rule.getIcmpType() != null ? rule.getIcmpType().toString() :
new String());
+            perm.setRuleId(rule.getRuleId() != null ? rule.getRuleId().toString() : "");
+            perm.setIcmpCode(rule.getIcmpCode() != null ? rule.getIcmpCode().toString() :
"");
+            perm.setIcmpType(rule.getIcmpType() != null ? rule.getIcmpType().toString() :
"");
             perm.setCIDR(rule.getCidr());
             perm.addIpRange(rule.getCidr());
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/66171871/awsapi/src/com/cloud/bridge/util/EC2RestAuth.java
----------------------------------------------------------------------
diff --git a/awsapi/src/com/cloud/bridge/util/EC2RestAuth.java b/awsapi/src/com/cloud/bridge/util/EC2RestAuth.java
index d2f4b1e..33368c1 100644
--- a/awsapi/src/com/cloud/bridge/util/EC2RestAuth.java
+++ b/awsapi/src/com/cloud/bridge/util/EC2RestAuth.java
@@ -120,7 +120,7 @@ public class EC2RestAuth {
 
     public void setHTTPRequestURI(String uri) {
         if (null == uri || 0 == uri.length())
-            this.httpRequestURI = new String("/");
+            this.httpRequestURI = "/";
         else
             this.httpRequestURI = uri.trim();
     }


Mime
View raw message