]> source.dussan.org Git - jgit.git/commitdiff
Fix ServiceMayNotContinueException constructors for Java 1.5 76/17176/1
authorColby Ranger <cranger@google.com>
Tue, 8 Oct 2013 17:16:45 +0000 (10:16 -0700)
committerColby Ranger <cranger@google.com>
Tue, 8 Oct 2013 17:16:45 +0000 (10:16 -0700)
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

org.eclipse.jgit/src/org/eclipse/jgit/transport/ServiceMayNotContinueException.java

index fde23b3fa7fbb797fa37d173176dd29587ddb66b..4c518eea9a9a0a78bd7055f2cfd696328893af3f 100644 (file)
@@ -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. */