try {
return new URL(redirectURL);
} catch (MalformedURLException ex) {
// log the exception as warning because most likely
// the subsequent attempt to redirect will fail
logger.log(Level.WARNING, "Redirect URL received is malformed. " +
"The URL is = " + redirectURL);
if (debug) ex.printStackTrace();
}
return null;