{"action":"opened","issue":{"url":"https://api.github.com/repos/paypal/PayPal-Java-SDK/issues/131","labels_url":"https://api.github.com/repos/paypal/PayPal-Java-SDK/issues/131/labels{/name}","comments_url":"https://api.github.com/repos/paypal/PayPal-Java-SDK/issues/131/comments","events_url":"https://api.github.com/repos/paypal/PayPal-Java-SDK/issues/131/events","html_url":"https://github.com/paypal/PayPal-Java-SDK/issues/131","id":111906916,"number":131,"title":"Tokeninfo.createFromRefreshTokenForFpp  is broken","user":{"login":"gauravcsun","id":138600,"avatar_url":"https://avatars.githubusercontent.com/u/138600?v=3","gravatar_id":"","url":"https://api.github.com/users/gauravcsun","html_url":"https://github.com/gauravcsun","followers_url":"https://api.github.com/users/gauravcsun/followers","following_url":"https://api.github.com/users/gauravcsun/following{/other_user}","gists_url":"https://api.github.com/users/gauravcsun/gists{/gist_id}","starred_url":"https://api.github.com/users/gauravcsun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gauravcsun/subscriptions","organizations_url":"https://api.github.com/users/gauravcsun/orgs","repos_url":"https://api.github.com/users/gauravcsun/repos","events_url":"https://api.github.com/users/gauravcsun/events{/privacy}","received_events_url":"https://api.github.com/users/gauravcsun/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-16T20:41:28Z","updated_at":"2015-10-16T20:41:28Z","closed_at":null,"body":"Hi,\r\n\r\nWhile trying to consume the` createFromRefreshTokenForFpp`   method I  figured out that \r\n\r\n`RESTUtil.formatURIPath` does not work correctly because the `grant_type` query string value is already set up, the `splitParameters` method of `RestUtils` class put the refresh token value at 1st place instead of 0th  in the return array \r\nand  this build up bad url as below instead of replacing refresh token\r\n\r\n`String pattern = \"v1/oauth2/token?grant_type=refresh_token&refresh_token={0}\";`\r\n\r\n`Output :  'v1/oauth2/token?grant_type=refresh_token`\r\n\r\nSimple Java Program to test\r\n\r\n```\r\nString pattern = \"v1/oauth2/token?grant_type=refresh_token&refresh_token={0}\";\r\nMap<String, String> paramsMap = new HashMap<String, String>();\r\ntry {\r\n\tparamsMap.put(\"refresh_token\", URLEncoder.encode(\"Ohw0tEN8fYHO5GfEN8W0iq0r6rTvkT19YARyNGzUDwm2k5B306ovyTZrC5D20Z8ovPrXPFCRV05-s-xwNQxg8b19wTo\",\r\n\t\t\t\t\tConstants.ENCODING_FORMAT));\r\n\t} catch (UnsupportedEncodingException ex) {\r\n\t\t\t// Ignore\r\n\t}\r\n\t\t\r\n\tObject[] parameters = new Object[] { paramsMap };\r\n\tString resourcePath = RESTUtil.formatURIPath(pattern, parameters);\r\n\t\t\r\n\tSystem.out.println(resourcePath);\r\n```\r\n"}}