From 013d345ef6710abe4a8db3778b1e67f602ffc659 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Fri, 12 Feb 2016 18:21:22 +0100 Subject: Use Guava Splitter to split IP address Using String.split() forces compilation of the regex, which is slow. Use a thread-safe Splitter to perform the same job. Change-Id: Icbc326a376bc9aaea692f80d01439e81a302bc5f Signed-off-by: Robert Varga --- .../main/java/io/fd/honeycomb/v3po/impl/VppIetfInterfaceListener.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/VppIetfInterfaceListener.java b/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/VppIetfInterfaceListener.java index 9b84a00f4..481c0ef60 100644 --- a/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/VppIetfInterfaceListener.java +++ b/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/VppIetfInterfaceListener.java @@ -16,6 +16,7 @@ package io.fd.honeycomb.v3po.impl; +import com.google.common.base.Splitter; import java.util.Collection; import org.opendaylight.controller.md.sal.binding.api.DataBroker; import org.opendaylight.controller.md.sal.binding.api.DataObjectModification; @@ -52,6 +53,7 @@ import org.slf4j.LoggerFactory; public class VppIetfInterfaceListener implements DataTreeChangeListener, AutoCloseable { private static final Logger LOG = LoggerFactory.getLogger(VppIetfInterfaceListener.class); + private static final Splitter DOT_SPLITTER = Splitter.on('.'); private final ListenerRegistration registration; private final DataBroker db; @@ -220,7 +222,7 @@ public class VppIetfInterfaceListener implements DataTreeChangeListener