From 402710aef4e954c26aa660215a9c1aeab976da04 Mon Sep 17 00:00:00 2001 From: Jozef Gloncak Date: Mon, 7 Apr 2014 08:27:19 +0200 Subject: [PATCH] bug - missing excaping of % character in String.format() method Change-Id: Ic44ff0cf558efbba9c465ac760da13fcf3add2cb Signed-off-by: Jozef Gloncak --- .../controller/sal/restconf/impl/RestconfImpl.xtend | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/RestconfImpl.xtend b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/RestconfImpl.xtend index 8ebf28f35f..fa478ac72e 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/RestconfImpl.xtend +++ b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/RestconfImpl.xtend @@ -305,7 +305,7 @@ class RestconfImpl implements RestconfService { return callRpc(rpc, null) } - def resolveIdentifierInInvokeRpc(String identifier) { + private def resolveIdentifierInInvokeRpc(String identifier) { if (identifier.indexOf("/") === -1) { val identifierDecoded = identifier.urlPathArgDecode val rpc = identifierDecoded.rpcDefinition @@ -314,8 +314,8 @@ class RestconfImpl implements RestconfService { } throw new ResponseException(NOT_FOUND, "RPC does not exist."); } - val slashErrorMsg = String.format("Identifier %n%s%ncan't contain slash character (/). + - If slash is part of identifier name then use %2F placeholder.",identifier) + val slashErrorMsg = String.format( + "Identifier %n%s%ncan't contain slash character (/).%nIf slash is part of identifier name then use %%2F placeholder.", identifier) throw new ResponseException(NOT_FOUND, slashErrorMsg); } -- 2.36.6