Integrate {Inference,Source}Exception with CommonStmtCtx
[yangtools.git] / yang / yang-parser-rfc7950 / src / main / java / org / opendaylight / yangtools / yang / parser / rfc7950 / stmt / key / KeyStatementSupport.java
index 300e5f71b1ae9770e2111d8baa8709a17071f1d2..cb5d1df08663ca6e4ea01115e8d1d01d238aa363 100644 (file)
@@ -56,8 +56,7 @@ public final class KeyStatementSupport
 
         // Throws NPE on nulls, retains first inserted value, cannot be modified
         final ImmutableSet<QName> ret = builder.build();
-        SourceException.throwIf(ret.size() != tokens, ctx.sourceReference(), "Key argument '%s' contains duplicates",
-            value);
+        SourceException.throwIf(ret.size() != tokens, ctx, "Key argument '%s' contains duplicates", value);
         return ret;
     }