Do not use String.split() in VpnUtil 23/77923/3
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 18 Nov 2018 21:46:38 +0000 (22:46 +0100)
committerRobert Varga <nite@hq.sk>
Fri, 23 Nov 2018 18:08:04 +0000 (18:08 +0000)
commitcc9faaec541abf68f500633c0f4e70f7760a78d4
tree19123ed8720c1aef5ac98ea840a4e83ccc4f8061
parent12cfa3166c3aec828132820eedd1a0a6e88a197c
Do not use String.split() in VpnUtil

Rather than compiling regexes and allocating String[]s, use a simple
indexOf() and substring getter to implement almost equivalent
functionality. This breaks on malformed inputs, like 1.2.3.4//24, but
that should be fine.

Change-Id: I1cb294abb3f17c84d332f8075f84e62c1dea86a6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
vpnmanager/impl/src/main/java/org/opendaylight/netvirt/vpnmanager/VpnUtil.java