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
This commit is contained in:
Steven Caswell 2002-08-25 13:20:59 +00:00
parent b34534b9d7
commit 1962432bfe
3 changed files with 3 additions and 77 deletions

View File

@ -64,7 +64,7 @@ import java.io.PrintWriter;
* @author <a href="mailto:dlr@collab.net">Daniel Rall</a>
* @author <a href="mailto:knielsen@apache.org">Kasper Nielsen</a>
* @author <a href="mailto:steven@caswell.name">Steven Caswell</a>
* @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 <code>Throwable</code>s represented by
* this <code>Nestable</code>, including this <code>Nestable</code>.
* @deprecated replaced by {@link #getThrowableCount()}
*/
public int getLength();
/**
* Returns the error message of this and any nested
* <code>Throwable</code>.
@ -173,25 +166,6 @@ public interface Nestable
*/
public int indexOfThrowable(Class type, int fromIndex);
/**
* Returns the index, numbered from 0, of the first <code>Throwable</code>
* that matches the specified type in the chain of <code>Throwable</code>s
* with an index greater than or equal to the specified position, or -1 if
* the type is not found. If <code>pos</code> is negative, the effect is the
* same as if it were 0. If <code>pos</code> 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 <code>Class</code> 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

View File

@ -125,7 +125,7 @@ import java.util.StringTokenizer;
* @author <a href="mailto:dlr@collab.net">Daniel Rall</a>
* @author <a href="mailto:knielsen@apache.org">Kasper Nielsen</a>
* @author <a href="mailto:steven@caswell.name">Steven Caswell</a>
* @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();

View File

@ -71,7 +71,7 @@ import java.util.StringTokenizer;
* @author <a href="mailto:dlr@collab.net">Daniel Rall</a>
* @author <a href="mailto:knielsen@apache.org">Kasper Nielsen</a>
* @author <a href="mailto:steven@caswell.name">Steven Caswell</a>
* @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();