String.format() is wasteful as we can use JEP280 to make things
a lot more performant.
Change-Id: Iab3d462b7133e656d30e50c6a08f58e798fa4b9f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
2923921d8979043ba44e89e2b7d596db3d07fe85)
"Bad char '" + currentChar() + "' on the current position.");
}
"Bad char '" + currentChar() + "' on the current position.");
}
- private RestconfDocumentedException createParsingException(final ErrorTag errorTag, final String messagePart) {
- return new RestconfDocumentedException(String.format(
- "Could not parse Instance Identifier '%s'. Offset: '%d' : Reason: %s", data, offset, messagePart),
+ private RestconfDocumentedException createParsingException(final ErrorTag errorTag, final String reason) {
+ return new RestconfDocumentedException(
+ "Could not parse Instance Identifier '" + data + "'. Offset: '" + offset + "' : Reason: " + reason,
ErrorType.PROTOCOL, errorTag);
}
ErrorType.PROTOCOL, errorTag);
}