From 1962432bfe1ddd4cd3dd1067712d30567602cef7 Mon Sep 17 00:00:00 2001 From: Steven Caswell Date: Sun, 25 Aug 2002 13:20:59 +0000 Subject: [PATCH] removed deprecated methods getLength() and indexOfThrowable(int, Class) git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@136986 13f79535-47bb-0310-9956-ffa450edef68 --- .../commons/lang/exception/Nestable.java | 28 +------------------ .../lang/exception/NestableException.java | 26 +---------------- .../exception/NestableRuntimeException.java | 26 +---------------- 3 files changed, 3 insertions(+), 77 deletions(-) diff --git a/src/java/org/apache/commons/lang/exception/Nestable.java b/src/java/org/apache/commons/lang/exception/Nestable.java index 80b8f5239..a54a63220 100644 --- a/src/java/org/apache/commons/lang/exception/Nestable.java +++ b/src/java/org/apache/commons/lang/exception/Nestable.java @@ -64,7 +64,7 @@ import java.io.PrintWriter; * @author Daniel Rall * @author Kasper Nielsen * @author Steven Caswell - * @version $Id: Nestable.java,v 1.2 2002/07/26 20:30:10 stevencaswell Exp $ + * @version $Id: Nestable.java,v 1.3 2002/08/25 13:20:59 stevencaswell Exp $ */ public interface Nestable { @@ -74,13 +74,6 @@ public interface Nestable */ public Throwable getCause(); - /** - * Returns the number of nested Throwables represented by - * this Nestable, including this Nestable. - * @deprecated replaced by {@link #getThrowableCount()} - */ - public int getLength(); - /** * Returns the error message of this and any nested * Throwable. @@ -173,25 +166,6 @@ public interface Nestable */ public int indexOfThrowable(Class type, int fromIndex); - /** - * Returns the index, numbered from 0, of the first Throwable - * that matches the specified type in the chain of Throwables - * with an index greater than or equal to the specified position, or -1 if - * the type is not found. If pos is negative, the effect is the - * same as if it were 0. If pos is greater than or equal to the - * length of the chain, the effect is the same as if it were the index of - * the last element in the chain. - * - * @param pos index, numbered from 0, of the starting position in the chain - * to be searched - * @param type Class to be found - * - * @return index of the first occurrence of the type in the chain, or -1 if - * the type is not found - * @deprecated replaced by {@link #indexOfThrowable(Class, int)} - */ - public int indexOfThrowable(int pos, Class type); - /** * Prints the stack trace of this exception to the specified print * writer. Includes inforamation from the exception--if diff --git a/src/java/org/apache/commons/lang/exception/NestableException.java b/src/java/org/apache/commons/lang/exception/NestableException.java index 0204227b4..f126c1799 100644 --- a/src/java/org/apache/commons/lang/exception/NestableException.java +++ b/src/java/org/apache/commons/lang/exception/NestableException.java @@ -125,7 +125,7 @@ import java.util.StringTokenizer; * @author Daniel Rall * @author Kasper Nielsen * @author Steven Caswell - * @version $Id: NestableException.java,v 1.2 2002/07/26 20:30:10 stevencaswell Exp $ + * @version $Id: NestableException.java,v 1.3 2002/08/25 13:20:59 stevencaswell Exp $ */ public class NestableException extends Exception implements Nestable { @@ -193,14 +193,6 @@ public class NestableException extends Exception implements Nestable return cause; } - /** - * @deprecated replaced by {@link #getThrowableCount()} - */ - public int getLength() - { - return delegate.getThrowableCount(); - } - public String getMessage() { StringBuffer msg = new StringBuffer(); @@ -267,22 +259,6 @@ public class NestableException extends Exception implements Nestable return delegate.indexOfThrowable(type, fromIndex); } - /** - * @deprecated replaced by {@link #indexOfThrowable(Class, int)} - */ - public int indexOfThrowable(int pos, Class type) - { - if(pos < 0) - { - pos = 0; - } - else if(pos >= this.getThrowableCount()) - { - pos = this.getThrowableCount() - 1; - } - return delegate.indexOfThrowable(type, pos); - } - public void printStackTrace() { delegate.printStackTrace(); diff --git a/src/java/org/apache/commons/lang/exception/NestableRuntimeException.java b/src/java/org/apache/commons/lang/exception/NestableRuntimeException.java index 6efa5a3f6..a1fe90665 100644 --- a/src/java/org/apache/commons/lang/exception/NestableRuntimeException.java +++ b/src/java/org/apache/commons/lang/exception/NestableRuntimeException.java @@ -71,7 +71,7 @@ import java.util.StringTokenizer; * @author Daniel Rall * @author Kasper Nielsen * @author Steven Caswell - * @version $Id: NestableRuntimeException.java,v 1.2 2002/07/26 20:30:10 stevencaswell Exp $ + * @version $Id: NestableRuntimeException.java,v 1.3 2002/08/25 13:20:59 stevencaswell Exp $ */ public class NestableRuntimeException extends RuntimeException implements Nestable @@ -140,14 +140,6 @@ public class NestableRuntimeException extends RuntimeException return cause; } - /** - * @deprecated replaced by {@link #getThrowableCount()} - */ - public int getLength() - { - return delegate.getThrowableCount(); - } - public String getMessage() { StringBuffer msg = new StringBuffer(); @@ -214,22 +206,6 @@ public class NestableRuntimeException extends RuntimeException return delegate.indexOfThrowable(type, fromIndex); } - /** - * @deprecated replaced by {@link #indexOfThrowable(Class, int)} - */ - public int indexOfThrowable(int pos, Class type) - { - if(pos < 0) - { - pos = 0; - } - else if(pos >= this.getThrowableCount()) - { - pos = this.getThrowableCount() - 1; - } - return delegate.indexOfThrowable(type, pos); - } - public void printStackTrace() { delegate.printStackTrace();