Sho SHIMIZU
Committed by Gerrit Code Review

Remove redundant toString() calls

Change-Id: I822e9cfe36b7162c7c4fc79e1680c6f54cd64827
...@@ -40,7 +40,7 @@ public class TenantIdCodec extends JsonCodec<TenantId> { ...@@ -40,7 +40,7 @@ public class TenantIdCodec extends JsonCodec<TenantId> {
40 checkNotNull(tenantId, NULL_TENANT_MSG); 40 checkNotNull(tenantId, NULL_TENANT_MSG);
41 41
42 ObjectNode result = context.mapper().createObjectNode() 42 ObjectNode result = context.mapper().createObjectNode()
43 - .put(TENANT_ID, tenantId.id().toString()); 43 + .put(TENANT_ID, tenantId.id());
44 44
45 return result; 45 return result;
46 } 46 }
......
...@@ -144,7 +144,7 @@ public final class Comparators { ...@@ -144,7 +144,7 @@ public final class Comparators {
144 public static final Comparator<DeviceKey> DEVICE_KEY_COMPARATOR = new Comparator<DeviceKey>() { 144 public static final Comparator<DeviceKey> DEVICE_KEY_COMPARATOR = new Comparator<DeviceKey>() {
145 @Override 145 @Override
146 public int compare(DeviceKey deviceKey1, DeviceKey deviceKey2) { 146 public int compare(DeviceKey deviceKey1, DeviceKey deviceKey2) {
147 - return deviceKey1.deviceKeyId().id().toString().compareTo(deviceKey2.deviceKeyId().id().toString()); 147 + return deviceKey1.deviceKeyId().id().compareTo(deviceKey2.deviceKeyId().id());
148 } 148 }
149 }; 149 };
150 150
...@@ -164,7 +164,7 @@ public final class Comparators { ...@@ -164,7 +164,7 @@ public final class Comparators {
164 public static final Comparator<TenantId> TENANT_ID_COMPARATOR = new Comparator<TenantId>() { 164 public static final Comparator<TenantId> TENANT_ID_COMPARATOR = new Comparator<TenantId>() {
165 @Override 165 @Override
166 public int compare(TenantId tenant1, TenantId tenant2) { 166 public int compare(TenantId tenant1, TenantId tenant2) {
167 - return tenant1.id().toString().compareTo(tenant2.id().toString()); 167 + return tenant1.id().compareTo(tenant2.id());
168 } 168 }
169 }; 169 };
170 170
......