mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-24 10:01:35 +01:00
made a broad catch even broader and checkstyle corrections
Former-commit-id: 5b6eb0775bfa5604bf27e510d75a693d5eb5dc66
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user