diff --git a/pom.xml b/pom.xml index dde789075d..0af43488f1 100644 --- a/pom.xml +++ b/pom.xml @@ -46,14 +46,6 @@ - - org.apache.maven.plugins - maven-compiler-plugin - - 1.6 - 1.6 - - org.codehaus.mojo findbugs-maven-plugin diff --git a/src/main/java/org/kohsuke/github/HttpException.java b/src/main/java/org/kohsuke/github/HttpException.java index 670cb491f4..16c8e68be2 100644 --- a/src/main/java/org/kohsuke/github/HttpException.java +++ b/src/main/java/org/kohsuke/github/HttpException.java @@ -49,7 +49,8 @@ public HttpException(String message, int responseCode, String responseMessage, S * @see HttpURLConnection#getResponseMessage() */ public HttpException(String message, int responseCode, String responseMessage, String url, Throwable cause) { - super(message, cause); + super(message); + initCause(cause); this.responseCode = responseCode; this.responseMessage = responseMessage; this.url = url; @@ -67,7 +68,8 @@ public HttpException(String message, int responseCode, String responseMessage, S */ public HttpException(int responseCode, String responseMessage, String url, Throwable cause) { super("Server returned HTTP response code: " + responseCode + ", message: '" + responseMessage + "'" + - " for URL: " + url, cause); + " for URL: " + url); + initCause(cause); this.responseCode = responseCode; this.responseMessage = responseMessage; this.url = url;