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> {
.put("id", subnet.id().toString())
.put("gateway_ip", subnet.gatewayIp().toString())
.put("network_id", subnet.networkId().toString())
.put("name", subnet.subnetName().toString())
.put("name", subnet.subnetName())
.put("ip_version", subnet.ipVersion().toString())
.put("cidr", subnet.cidr().toString())
.put("shared", subnet.shared())
......
......@@ -33,7 +33,7 @@ public final class TenantNetworkCodec extends JsonCodec<TenantNetwork> {
checkNotNull(network, "Network cannot be null");
ObjectNode result = context.mapper().createObjectNode()
.put("id", network.id().toString())
.put("name", network.name().toString())
.put("name", network.name())
.put("admin_state_up", network.adminStateUp())
.put("status", "" + network.state())
.put("shared", network.shared())
......
......@@ -36,16 +36,16 @@ public final class VirtualPortCodec extends JsonCodec<VirtualPort> {
.put("id", vPort.portId().toString())
.put("network_id", vPort.networkId().toString())
.put("admin_state_up", vPort.adminStateUp())
.put("name", vPort.name().toString())
.put("name", vPort.name())
.put("status", vPort.state().toString())
.put("mac_address", vPort.macAddress().toString())
.put("tenant_id", vPort.tenantId().toString())
.put("device_id", vPort.deviceId().toString())
.put("device_owner", vPort.deviceOwner().toString())
.put("binding:vnic_type", vPort.bindingVnicType().toString())
.put("binding:Vif_type", vPort.bindingVifType().toString())
.put("device_owner", vPort.deviceOwner())
.put("binding:vnic_type", vPort.bindingVnicType())
.put("binding:Vif_type", vPort.bindingVifType())
.put("binding:host_id", vPort.bindingHostId().toString())
.put("binding:vif_details", vPort.bindingVifDetails().toString());
.put("binding:vif_details", vPort.bindingVifDetails());
result.set("allowed_address_pairs", new AllowedAddressPairCodec().encode(
vPort.allowedAddressPairs(), context));
result.set("fixed_ips", new FixedIpCodec().encode(
......
......@@ -95,8 +95,7 @@ public class TenantNetworkWebResource extends AbstractWebResource {
while (networkors.hasNext()) {
TenantNetwork network = networkors.next();
if ((queryId == null || queryId.equals(network.id().toString()))
&& (queryName == null || queryName.equals(network.name()
.toString()))
&& (queryName == null || queryName.equals(network.name()))
&& (queryadminStateUp == null || queryadminStateUp
.equals(network.adminStateUp()))
&& (querystate == null || querystate.equals(network.state()
......