Sho SHIMIZU
Committed by Gerrit Code Review

Remove redundant toString() calls

Change-Id: Ibb91f90054d5791733353308e86d0494734f63aa
...@@ -34,7 +34,7 @@ public final class SubnetCodec extends JsonCodec<Subnet> { ...@@ -34,7 +34,7 @@ public final class SubnetCodec extends JsonCodec<Subnet> {
34 .put("id", subnet.id().toString()) 34 .put("id", subnet.id().toString())
35 .put("gateway_ip", subnet.gatewayIp().toString()) 35 .put("gateway_ip", subnet.gatewayIp().toString())
36 .put("network_id", subnet.networkId().toString()) 36 .put("network_id", subnet.networkId().toString())
37 - .put("name", subnet.subnetName().toString()) 37 + .put("name", subnet.subnetName())
38 .put("ip_version", subnet.ipVersion().toString()) 38 .put("ip_version", subnet.ipVersion().toString())
39 .put("cidr", subnet.cidr().toString()) 39 .put("cidr", subnet.cidr().toString())
40 .put("shared", subnet.shared()) 40 .put("shared", subnet.shared())
......
...@@ -33,7 +33,7 @@ public final class TenantNetworkCodec extends JsonCodec<TenantNetwork> { ...@@ -33,7 +33,7 @@ public final class TenantNetworkCodec extends JsonCodec<TenantNetwork> {
33 checkNotNull(network, "Network cannot be null"); 33 checkNotNull(network, "Network cannot be null");
34 ObjectNode result = context.mapper().createObjectNode() 34 ObjectNode result = context.mapper().createObjectNode()
35 .put("id", network.id().toString()) 35 .put("id", network.id().toString())
36 - .put("name", network.name().toString()) 36 + .put("name", network.name())
37 .put("admin_state_up", network.adminStateUp()) 37 .put("admin_state_up", network.adminStateUp())
38 .put("status", "" + network.state()) 38 .put("status", "" + network.state())
39 .put("shared", network.shared()) 39 .put("shared", network.shared())
......
...@@ -36,16 +36,16 @@ public final class VirtualPortCodec extends JsonCodec<VirtualPort> { ...@@ -36,16 +36,16 @@ public final class VirtualPortCodec extends JsonCodec<VirtualPort> {
36 .put("id", vPort.portId().toString()) 36 .put("id", vPort.portId().toString())
37 .put("network_id", vPort.networkId().toString()) 37 .put("network_id", vPort.networkId().toString())
38 .put("admin_state_up", vPort.adminStateUp()) 38 .put("admin_state_up", vPort.adminStateUp())
39 - .put("name", vPort.name().toString()) 39 + .put("name", vPort.name())
40 .put("status", vPort.state().toString()) 40 .put("status", vPort.state().toString())
41 .put("mac_address", vPort.macAddress().toString()) 41 .put("mac_address", vPort.macAddress().toString())
42 .put("tenant_id", vPort.tenantId().toString()) 42 .put("tenant_id", vPort.tenantId().toString())
43 .put("device_id", vPort.deviceId().toString()) 43 .put("device_id", vPort.deviceId().toString())
44 - .put("device_owner", vPort.deviceOwner().toString()) 44 + .put("device_owner", vPort.deviceOwner())
45 - .put("binding:vnic_type", vPort.bindingVnicType().toString()) 45 + .put("binding:vnic_type", vPort.bindingVnicType())
46 - .put("binding:Vif_type", vPort.bindingVifType().toString()) 46 + .put("binding:Vif_type", vPort.bindingVifType())
47 .put("binding:host_id", vPort.bindingHostId().toString()) 47 .put("binding:host_id", vPort.bindingHostId().toString())
48 - .put("binding:vif_details", vPort.bindingVifDetails().toString()); 48 + .put("binding:vif_details", vPort.bindingVifDetails());
49 result.set("allowed_address_pairs", new AllowedAddressPairCodec().encode( 49 result.set("allowed_address_pairs", new AllowedAddressPairCodec().encode(
50 vPort.allowedAddressPairs(), context)); 50 vPort.allowedAddressPairs(), context));
51 result.set("fixed_ips", new FixedIpCodec().encode( 51 result.set("fixed_ips", new FixedIpCodec().encode(
......
...@@ -95,8 +95,7 @@ public class TenantNetworkWebResource extends AbstractWebResource { ...@@ -95,8 +95,7 @@ public class TenantNetworkWebResource extends AbstractWebResource {
95 while (networkors.hasNext()) { 95 while (networkors.hasNext()) {
96 TenantNetwork network = networkors.next(); 96 TenantNetwork network = networkors.next();
97 if ((queryId == null || queryId.equals(network.id().toString())) 97 if ((queryId == null || queryId.equals(network.id().toString()))
98 - && (queryName == null || queryName.equals(network.name() 98 + && (queryName == null || queryName.equals(network.name()))
99 - .toString()))
100 && (queryadminStateUp == null || queryadminStateUp 99 && (queryadminStateUp == null || queryadminStateUp
101 .equals(network.adminStateUp())) 100 .equals(network.adminStateUp()))
102 && (querystate == null || querystate.equals(network.state() 101 && (querystate == null || querystate.equals(network.state()
......