GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — some String instantiations removed · enterdevstudio/cloudstack@6617187

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • awsapi/src/com/cloud/bridge
    • service
      • EC2SoapServiceImpl.java
      • core/ec2
        • EC2Engine.java
    • util
      • EC2RestAuth.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎awsapi/src/com/cloud/bridge/service/EC2SoapServiceImpl.java‎

Copy file name to clipboardExpand all lines: awsapi/src/com/cloud/bridge/service/EC2SoapServiceImpl.java
+12-12Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@ public DescribeSnapshotsResponse describeSnapshots(DescribeSnapshots describeSna
999999

10001000
if (null != fst) {
10011001
String[] timeFilters = new String[1];
1002-
timeFilters[0] = new String("start-time");
1002+
timeFilters[0] = "start-time";
10031003
request = toSnapshotFilterSet(request, fst, timeFilters);
10041004
}
10051005

@@ -1035,8 +1035,8 @@ public DescribeVolumesResponse describeVolumes(DescribeVolumes describeVolumes)
10351035

10361036
if (null != fst) {
10371037
String[] timeFilters = new String[2];
1038-
timeFilters[0] = new String("attachment.attach-time");
1039-
timeFilters[1] = new String("create-time");
1038+
timeFilters[0] = "attachment.attach-time";
1039+
timeFilters[1] = "create-time";
10401040
request = toVolumeFilterSet(request, fst, timeFilters);
10411041
}
10421042

@@ -2070,24 +2070,24 @@ else if (cloudState.equalsIgnoreCase("Expunging"))
20702070

20712071
public static String toAmazonStateName(String cloudState) {
20722072
if (null == cloudState)
2073-
return new String("terminated");
2073+
return "terminated";
20742074

20752075
if (cloudState.equalsIgnoreCase("Destroyed"))
2076-
return new String("terminated");
2076+
return "terminated";
20772077
else if (cloudState.equalsIgnoreCase("Stopped"))
2078-
return new String("stopped");
2078+
return "stopped";
20792079
else if (cloudState.equalsIgnoreCase("Running"))
2080-
return new String("running");
2080+
return "running";
20812081
else if (cloudState.equalsIgnoreCase("Starting"))
2082-
return new String("pending");
2082+
return "pending";
20832083
else if (cloudState.equalsIgnoreCase("Stopping"))
2084-
return new String("stopping");
2084+
return "stopping";
20852085
else if (cloudState.equalsIgnoreCase("Error"))
2086-
return new String("error");
2086+
return "error";
20872087
else if (cloudState.equalsIgnoreCase("Expunging"))
2088-
return new String("terminated");
2088+
return "terminated";
20892089
else
2090-
return new String("running");
2090+
return "running";
20912091
}
20922092

20932093
public static StopInstancesResponse toStopInstancesResponse(EC2StopInstancesResponse engineResponse) {
Collapse file

‎awsapi/src/com/cloud/bridge/service/core/ec2/EC2Engine.java‎

Copy file name to clipboardExpand all lines: awsapi/src/com/cloud/bridge/service/core/ec2/EC2Engine.java
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2233,9 +2233,9 @@ private boolean toPermission(EC2SecurityGroup response, CloudStackSecurityGroup
22332233
perm.setProtocol(rule.getProtocol());
22342234
perm.setFromPort(rule.getStartPort());
22352235
perm.setToPort(rule.getEndPort());
2236-
perm.setRuleId(rule.getRuleId() != null ? rule.getRuleId().toString() : new String());
2237-
perm.setIcmpCode(rule.getIcmpCode() != null ? rule.getIcmpCode().toString() : new String());
2238-
perm.setIcmpType(rule.getIcmpType() != null ? rule.getIcmpType().toString() : new String());
2236+
perm.setRuleId(rule.getRuleId() != null ? rule.getRuleId().toString() : "");
2237+
perm.setIcmpCode(rule.getIcmpCode() != null ? rule.getIcmpCode().toString() : "");
2238+
perm.setIcmpType(rule.getIcmpType() != null ? rule.getIcmpType().toString() : "");
22392239
perm.setCIDR(rule.getCidr());
22402240
perm.addIpRange(rule.getCidr());
22412241

Collapse file

‎awsapi/src/com/cloud/bridge/util/EC2RestAuth.java‎

Copy file name to clipboardExpand all lines: awsapi/src/com/cloud/bridge/util/EC2RestAuth.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public void setHostHeader(String hostHeader) {
120120

121121
public void setHTTPRequestURI(String uri) {
122122
if (null == uri || 0 == uri.length())
123-
this.httpRequestURI = new String("/");
123+
this.httpRequestURI = "/";
124124
else
125125
this.httpRequestURI = uri.trim();
126126
}

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.