made a broad catch even broader and checkstyle corrections

Former-commit-id: 5b6eb0775bfa5604bf27e510d75a693d5eb5dc66
This commit is contained in:
Jeremy Long
2014-03-01 06:41:40 -05:00
parent cf46afea94
commit cdf6e3b456

View File

@@ -137,7 +137,7 @@ public class NexusSearch {
* Nexus. This is useful upstream for recovery, so we just re-throw it * Nexus. This is useful upstream for recovery, so we just re-throw it
*/ */
throw fnfe; throw fnfe;
} catch (Exception e) { } catch (Throwable e) {
// Anything else is jacked-up XML stuff that we really can't recover // Anything else is jacked-up XML stuff that we really can't recover
// from well // from well
throw new IOException(e.getMessage(), e); throw new IOException(e.getMessage(), e);
@@ -151,7 +151,7 @@ public class NexusSearch {
*/ */
public boolean preflightRequest() { public boolean preflightRequest() {
try { try {
HttpURLConnection conn = URLConnectionFactory.createHttpURLConnection(new URL(rootURL, "status")); final HttpURLConnection conn = URLConnectionFactory.createHttpURLConnection(new URL(rootURL, "status"));
conn.addRequestProperty("Accept", "application/xml"); conn.addRequestProperty("Accept", "application/xml");
conn.connect(); conn.connect();
if (conn.getResponseCode() != 200) { if (conn.getResponseCode() != 200) {
@@ -164,7 +164,7 @@ public class NexusSearch {
LOGGER.warning("Expected root node name of status, got " + doc.getDocumentElement().getNodeName()); LOGGER.warning("Expected root node name of status, got " + doc.getDocumentElement().getNodeName());
return false; return false;
} }
} catch (Exception e) { } catch (Throwable e) {
return false; return false;
} }