Created
March 4, 2012 12:49
-
-
Save anuvrat/1972858 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public String cleanUrlNew(String url, String locale, String asin) { | |
String result; | |
try { | |
URL tempUrl = new URL(url); | |
result = tempUrl.getProtocol() + "://" + tempUrl.getAuthority() + tempUrl.getPath(); | |
} catch (MalformedURLException e) { | |
// This should never happen. If it happens we should file a bug with PAAPI team. | |
logger.warn("PAAPI returned an invalid url - " + url); | |
result = cleanUrl(url, locale, asin); | |
} | |
return result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment