Replace StringBuilder with more efficient String concatenation
authorRyan Goulding <ryandgoulding@gmail.com>
Sat, 22 Aug 2015 18:31:33 +0000 (14:31 -0400)
committerRyan Goulding <ryandgoulding@gmail.com>
Sat, 22 Aug 2015 18:32:42 +0000 (14:32 -0400)
Just replaces the StringBuilder with a more efficient/readable
String concatenation operation.

Change-Id: Idce8fed3d4e207ff1a95cf24267a41fa8682a08a
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
openstack/net-virt-providers/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/providers/openflow13/services/arp/GatewayMacResolverService.java

index 70ff81a4fcb66a9f19d64f3a946dad5e081801a6..d6ce3d8b7c4a5700ae81c087b04db56e82866b43 100644 (file)
@@ -335,10 +335,8 @@ public class GatewayMacResolverService extends AbstractServiceInstance
     }
 
     private FlowId createFlowId(ArpMessageAddress senderAddress, Ipv4Address ipForRequestedMac) {
-        StringBuilder sb = new StringBuilder();
-        sb.append(ARP_REPLY_TO_CONTROLLER_FLOW_NAME);
-        sb.append("|").append(ipForRequestedMac.getValue());
-        return new FlowId(sb.toString());
+        String flowId = ARP_REPLY_TO_CONTROLLER_FLOW_NAME + "|" + ipForRequestedMac.getValue();
+        return new FlowId(flowId);
     }
 
     private static InstanceIdentifier<Flow> createFlowIid(Flow flow, InstanceIdentifier<Node> nodeIid) {