commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject cvs commit: jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly JellyException.java
Date Wed, 30 Oct 2002 13:19:57 GMT
jstrachan    2002/10/30 05:19:57

  Modified:    jelly/src/java/org/apache/commons/jelly JellyException.java
  Log:
  Added some synchronization to the exception reporting code as the JDK does
  
  Revision  Changes    Path
  1.10      +17 -23    jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/JellyException.java
  
  Index: JellyException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/JellyException.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- JellyException.java	15 Jul 2002 16:18:15 -0000	1.9
  +++ JellyException.java	30 Oct 2002 13:19:57 -0000	1.10
  @@ -201,28 +201,22 @@
   
       // #### overload the printStackTrace methods...
       public void printStackTrace(PrintWriter s) { 
  -        super.printStackTrace(s);
  -        if  (cause != null) {
  -            s.println("Root cause");
  -            cause.printStackTrace(s);
  +        synchronized (s) {
  +            super.printStackTrace(s);
  +            if  (cause != null) {
  +                s.println("Root cause");
  +                cause.printStackTrace(s);
  +            }
           }
       }
           
       public void printStackTrace(PrintStream s) {
  -        super.printStackTrace(s);
  -        if  (cause != null) {
  -            s.println("Root cause");
  -            cause.printStackTrace(s);
  +        synchronized (s) {
  +            super.printStackTrace(s);
  +            if  (cause != null) {
  +                s.println("Root cause");
  +                cause.printStackTrace(s);
  +            }
           }
       }
  -
  -    /*
  -    public void printStackTrace() {
  -        super.printStackTrace();
  -        if ( cause != null ) {
  -            System.err.println("Root cause");
  -            cause.printStackTrace();
  -        }
  -    }
  -    */
   }
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message