Use shared Splitter instance 37/27737/6
authorRobert Varga <rovarga@cisco.com>
Thu, 1 Oct 2015 11:13:48 +0000 (13:13 +0200)
committerGerrit Code Review <gerrit@opendaylight.org>
Fri, 2 Oct 2015 10:59:19 +0000 (10:59 +0000)
Do not instantiate a temporary splitter, but reuse the global one.

Change-Id: Ida0d6a725aab4731cd787ca6719e33c002422b5e
Signed-off-by: Robert Varga <rovarga@cisco.com>
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/ExtendedTypeEffectiveStatementImpl.java

index ba1a9ad6753e332235cf2017b253f52393660bce..83205893c78f2c3a654673d2a4189041f3f01af9 100644 (file)
@@ -96,8 +96,7 @@ public class ExtendedTypeEffectiveStatementImpl extends EffectiveStatementBase<S
         QName qName;
 
         if (isExtended) {
-            final Splitter colonSplitter = Splitter.on(":").trimResults();
-            final List<String> nameTokens = colonSplitter.splitToList(ctx.getStatementArgument());
+            final List<String> nameTokens = COLON_SPLITTER.splitToList(ctx.getStatementArgument());
 
             switch (nameTokens.size()) {
             case 1: