X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=yang%2Fyang-parser-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fyang%2Fparser%2Fstmt%2Frfc6020%2Feffective%2FEffectiveStmtUtils.java;h=63c5b10da14e7c349b9c0cab5fecbfd51eec2ade;hb=04fa25a4fe8957f6492618aa9a1e9a4f9af39df4;hp=854b857dfeaa9cf9558827469a18573b691b0a00;hpb=bf405586fc69c3781311cfb8ac19ba93b670ec8d;p=yangtools.git diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/EffectiveStmtUtils.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/EffectiveStmtUtils.java index 854b857dfe..63c5b10da1 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/EffectiveStmtUtils.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/EffectiveStmtUtils.java @@ -12,22 +12,18 @@ import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement; import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext; import org.opendaylight.yangtools.yang.parser.spi.source.SourceException; -public final class EffectiveStmtUtils { +final class EffectiveStmtUtils { private EffectiveStmtUtils() { throw new UnsupportedOperationException("Utility class"); } - public static SourceException createNameCollisionSourceException(final StmtContext ctx, + static SourceException createNameCollisionSourceException(final StmtContext ctx, final EffectiveStatement effectiveStatement) { - return new SourceException("Error in module '" - + ctx.getRoot().getStatementArgument() - + "': can not add '" - + effectiveStatement.argument() - + "'. Node name collision: '" - + effectiveStatement.argument() - + "' already declared.", - ctx.getStatementSourceReference()); + return new SourceException(ctx.getStatementSourceReference(), + "Error in module '%s': cannot add '%s'. Node name collision: '%s' already declared.", + ctx.getRoot().getStatementArgument(), + effectiveStatement.argument(), + effectiveStatement.argument()); } - }