You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by dl...@apache.org on 2002/08/25 21:15:03 UTC
cvs commit: jakarta-commons/lang/src/java/org/apache/commons/lang/exception NestableRuntimeException.java
dlr 2002/08/25 12:15:03
Modified: lang/src/java/org/apache/commons/lang/exception
NestableRuntimeException.java
Log:
Leveraged NestableDelegate.getMessage(String).
Revision Changes Path
1.4 +3 -22 jakarta-commons/lang/src/java/org/apache/commons/lang/exception/NestableRuntimeException.java
Index: NestableRuntimeException.java
===================================================================
RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/exception/NestableRuntimeException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -u -r1.3 -r1.4
--- NestableRuntimeException.java 25 Aug 2002 13:20:59 -0000 1.3
+++ NestableRuntimeException.java 25 Aug 2002 19:15:03 -0000 1.4
@@ -142,31 +142,12 @@
public String getMessage()
{
- StringBuffer msg = new StringBuffer();
- String ourMsg = super.getMessage();
- if (ourMsg != null)
- {
- msg.append(ourMsg);
- }
- if (cause != null)
- {
- String causeMsg = cause.getMessage();
- if (causeMsg != null)
- {
- if (ourMsg != null)
- {
- msg.append(": ");
- }
- msg.append(causeMsg);
- }
-
- }
- return (msg.length() > 0 ? msg.toString() : null);
+ return delegate.getMessage(super.getMessage());
}
public String getMessage(int index)
{
- if(index == 0)
+ if (index == 0)
{
return super.getMessage();
}
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>