Fix checkArgument() format string 26/64426/2
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 16 Oct 2017 16:27:16 +0000 (18:27 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 18 Oct 2017 09:51:29 +0000 (11:51 +0200)
{} is the wrong placeholder, fix it to %s.

Change-Id: Ibbec204bd3752d05ab381d4834d847141cc28a4a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/StatementContextBase.java

index 9f9f5390c30f8f316251a4fcfd24adea6d2cfa19..21af8fc0afde925601dfa1087ad2791e80603e56 100644 (file)
@@ -578,7 +578,7 @@ public abstract class StatementContextBase<A, D extends DeclaredStatement<A>, E
 
         final NamespaceBehaviour<K, V, N> behaviour = getBehaviourRegistry().getNamespaceBehaviour(type);
         Preconditions.checkArgument(behaviour instanceof NamespaceBehaviourWithListeners,
-            "Namespace {} does not support listeners", type);
+            "Namespace %s does not support listeners", type);
 
         final NamespaceBehaviourWithListeners<K, V, N> casted = (NamespaceBehaviourWithListeners<K, V, N>) behaviour;
         casted.addValueListener(new ValueAddedListener<K>(this, key) {