From 06ddee1c3f1ca1a7aa5180e0a0e3670e1849153a Mon Sep 17 00:00:00 2001 From: Colby Ranger Date: Tue, 8 Oct 2013 10:16:45 -0700 Subject: [PATCH] Fix ServiceMayNotContinueException constructors for Java 1.5 IOException did not add a (String, Throwable) constructor until 1.5. Instead use the String super constructor and initCause to initialize the exception. Fixes bug 418889 Change-Id: Ide735ecfc7d04884981b79b57a4275863ce17006 --- .../jgit/transport/ServiceMayNotContinueException.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ServiceMayNotContinueException.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ServiceMayNotContinueException.java index fde23b3fa..4c518eea9 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ServiceMayNotContinueException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ServiceMayNotContinueException.java @@ -79,7 +79,8 @@ public class ServiceMayNotContinueException extends IOException { * the cause of the exception. */ public ServiceMayNotContinueException(String msg, Throwable cause) { - super(msg, cause); + super(msg); + initCause(cause); } /** @@ -89,7 +90,7 @@ public class ServiceMayNotContinueException extends IOException { * the cause of the exception. */ public ServiceMayNotContinueException(Throwable cause) { - super(JGitText.get().internalServerError, cause); + this(JGitText.get().internalServerError, cause); } /** @return true if the message was already output to the client. */