private static HttpURLConnection run(URLConnectionFactory factory, URL url) throws IOException, AuthenticationException { HttpURLConnection conn = null; try { conn = (HttpURLConnection) factory.openConnection(url, true); if (conn.getResponseCode() != HttpURLConnection.HTTP_OK) { String msg = conn.getResponseMessage(); throw new IOException("Error when dealing remote token: " + msg); } } catch (IOException ie) { LOG.info("Error when dealing remote token:", ie); IOException e = getExceptionFromResponse(conn); if (e != null) { LOG.info("rethrowing exception from HTTP request: " + e.getLocalizedMessage()); throw e; } throw ie; } return conn; } }
} catch (IOException ie) { LOG.info("error in renew over HTTP", ie); IOException e = getExceptionFromResponse(connection);
private static HttpURLConnection run(URLConnectionFactory factory, URL url) throws IOException, AuthenticationException { HttpURLConnection conn = null; try { conn = (HttpURLConnection) factory.openConnection(url, true); if (conn.getResponseCode() != HttpURLConnection.HTTP_OK) { String msg = conn.getResponseMessage(); throw new IOException("Error when dealing remote token: " + msg); } } catch (IOException ie) { LOG.info("Error when dealing remote token:", ie); IOException e = getExceptionFromResponse(conn); if (e != null) { LOG.info("rethrowing exception from HTTP request: " + e.getLocalizedMessage()); throw e; } throw ie; } return conn; } }
} catch (IOException ie) { LOG.info("error in renew over HTTP", ie); IOException e = getExceptionFromResponse(connection);