/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.apache.catalina.connector;

import java.io.IOException;

/**
 * Wrap an IOException identifying it as being caused by an abort
 * of a request by a remote client.
 *
 * @author Glenn L. Nielsen
 * @version $Id$
 */

public final class ClientAbortException extends IOException {

    private static final long serialVersionUID = 1L;


    //------------------------------------------------------------ Constructors

    /**
     * Construct a new ClientAbortException with no other information.
     */
    public ClientAbortException() {

        this(null, null);

    }


    /**
     * Construct a new ClientAbortException for the specified message.
     *
     * @param message Message describing this exception
     */
    public ClientAbortException(String message) {

        this(message, null);

    }


    /**
     * Construct a new ClientAbortException for the specified throwable.
     *
     * @param throwable Throwable that caused this exception
     */
    public ClientAbortException(Throwable throwable) {

        this(null, throwable);

    }


    /**
     * Construct a new ClientAbortException for the specified message
     * and throwable.
     *
     * @param message Message describing this exception
     * @param throwable Throwable that caused this exception
     */
    public ClientAbortException(String message, Throwable throwable) {

        super();
        this.message = message;
        this.throwable = throwable;

    }


    //------------------------------------------------------ Instance Variables


    /**
     * The error message passed to our constructor (if any)
     */
    protected String message = null;


    /**
     * The underlying exception or error passed to our constructor (if any)
     */
    protected Throwable throwable = null;


    //---------------------------------------------------------- Public Methods


    /**
     * Returns the message associated with this exception, if any.
     */
    @Override
    public String getMessage() {

        return (message);

    }


    /**
     * Returns the cause that caused this exception, if any.
     */
    @Override
    public Throwable getCause() {

        return (throwable);

    }


    /**
     * Return a formatted string that describes this exception.
     */
    @Override
    public String toString() {

        StringBuilder sb = new StringBuilder("ClientAbortException:  ");
        if (message != null) {
            sb.append(message);
            if (throwable != null) {
                sb.append(":  ");
            }
        }
        if (throwable != null) {
            sb.append(throwable.toString());
        }
        return (sb.toString());

    }


}

@@ -1023,17 +1023,16 @@
 Id$%0A */%0A
-%0A
 public f
@@ -1341,33 +1341,32 @@
 ception() %7B%0A
-%0A
         
 this(null, n
@@ -1357,27 +1357,17 @@
     
-this(null, null
+super(
 );%0A
-%0A
     
@@ -1566,33 +1566,32 @@
  message) %7B%0A
-%0A
         
 this(message
@@ -1582,20 +1582,21 @@
     
-this
+super
 (message
 , nu
@@ -1595,18 +1595,11 @@
 sage
-, null
 );%0A
-%0A
     
@@ -1814,25 +1814,24 @@
 able) %7B%0A
-%0A
         
 this(nul
@@ -1826,19 +1826,14 @@
     
-this(null, 
+super(
 thro
@@ -1832,33 +1832,32 @@
 per(throwable);%0A
-%0A
     %7D%0A%0A%0A    /**%0A
@@ -2147,25 +2147,24 @@
 hrowable) %7B%0A
-%0A
         supe
@@ -2169,811 +2169,17 @@
 per(
-);%0A        this.message = message;%0A        this.throwable = throwable;%0A%0A    %7D%0A%0A%0A    //------------------------------------------------------ Instance Variables%0A%0A%0A    /**%0A     * The error message passed to our constructor (if any)%0A     */%0A    protected String message = null;%0A%0A%0A    /**%0A     * The underlying exception or error passed to our constructor (if any)%0A     */%0A    protected Throwable throwable = null;%0A%0A%0A    //---------------------------------------------------------- Public Methods%0A%0A%0A    /**%0A     * Returns the message associated with this exception, if any.%0A     */%0A    @Override%0A    public String getMessage() %7B%0A%0A        return (message);%0A%0A    %7D%0A%0A%0A    /**%0A     * Returns the cause that caused this exception, if any.%0A     */%0A    @Override%0A    public Throwable getCause() %7B%0A%0A        return (
+message, 
 thro
@@ -2190,501 +2190,12 @@
 e);%0A
-%0A
     %7D%0A
-%0A%0A    /**%0A     * Return a formatted string that describes this exception.%0A     */%0A    @Override%0A    public String toString() %7B%0A%0A        StringBuilder sb = new StringBuilder(%22ClientAbortException:  %22);%0A        if (message != null) %7B%0A            sb.append(message);%0A            if (throwable != null) %7B%0A                sb.append(%22:  %22);%0A            %7D%0A        %7D%0A        if (throwable != null) %7B%0A            sb.append(throwable.toString());%0A        %7D%0A        return (sb.toString());%0A%0A    %7D%0A%0A%0A
 %7D%0A

Simplify (this class dates from pre-Java 1.4)