shuber      2004/11/09 18:32:34 CET

  Modified files:        (Branch: JAHIA-4-0-BRANCH)
    src/java/org/jahia/bin JahiaErrorDisplay.java 
    src/java/org/jahia/services/applications 
                                             
JahiaApplicationsDispatchingServletService.java 
  Log:
  Bugfix : removed looping with nested exception in web applications.
  
  Revision  Changes    Path
  1.12.4.1  +8 -1      jahia/src/java/org/jahia/bin/JahiaErrorDisplay.java
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/src/java/org/jahia/bin/JahiaErrorDisplay.java.diff?r1=1.12&r2=1.12.4.1&f=h
  1.50.2.4  +4 -12     
jahia/src/java/org/jahia/services/applications/JahiaApplicationsDispatchingServletService.java
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/src/java/org/jahia/services/applications/JahiaApplicationsDispatchingServletService.java.diff?r1=1.50.2.3&r2=1.50.2.4&f=h
  
  
  
  Index: JahiaErrorDisplay.java
  ===================================================================
  RCS file: 
/home/cvs/repository/jahia/src/java/org/jahia/bin/Attic/JahiaErrorDisplay.java,v
  retrieving revision 1.12
  retrieving revision 1.12.4.1
  diff -u -r1.12 -r1.12.4.1
  --- JahiaErrorDisplay.java    6 Sep 2003 12:15:31 -0000       1.12
  +++ JahiaErrorDisplay.java    9 Nov 2004 17:32:33 -0000       1.12.4.1
  @@ -1,4 +1,4 @@
  -// $Id: JahiaErrorDisplay.java,v 1.12 2003/09/06 12:15:31 shuber Exp $
  +// $Id: JahiaErrorDisplay.java,v 1.12.4.1 2004/11/09 17:32:33 shuber Exp $
   //
   //                                   ____.
   //                       __/\ ______|    |__/\.     _______
  @@ -511,6 +511,13 @@
           return newDepth;
       }
   
  +    /**
  +     * Returns the nested exception if there is one, otherwise returns the
  +     * current exception.
  +     * @param t Throwable
  +     * @return Throwable this method never returns null so don't put it in a
  +     * loop !
  +     */
       public static Throwable getNestedException(Throwable t) {
           if (t == null) {
               return null;
  
  
  
  Index: JahiaApplicationsDispatchingServletService.java
  ===================================================================
  RCS file: 
/home/cvs/repository/jahia/src/java/org/jahia/services/applications/Attic/JahiaApplicationsDispatchingServletService.java,v
  retrieving revision 1.50.2.3
  retrieving revision 1.50.2.4
  diff -u -r1.50.2.3 -r1.50.2.4
  --- JahiaApplicationsDispatchingServletService.java   18 Aug 2004 13:00:46 
-0000      1.50.2.3
  +++ JahiaApplicationsDispatchingServletService.java   9 Nov 2004 17:32:34 
-0000       1.50.2.4
  @@ -336,12 +336,8 @@
               logger.error ("Error in web application, can't access 
application " +
                             appBean.getName (), se);
               Throwable t = se;
  -            int count = 0;
  -            while (JahiaErrorDisplay.getNestedException(t) != null) {
  -                count++;
  -                t = JahiaErrorDisplay.getNestedException(t);
  -                logger.error("Nested exception " + count, t);
  -            }
  +            t = JahiaErrorDisplay.getNestedException(t);
  +            logger.error("Nested exception ", t);
               return "Error while retrieving application " + appBean.getName 
();
           } catch (IOException ioe) {
               logger.error ("Error in web application " +
  @@ -351,12 +347,8 @@
               logger.error ("Error in web application for app " +
                             appBean.getName (), t);
               Throwable th = t;
  -            int count = 0;
  -            while (JahiaErrorDisplay.getNestedException(th) != null) {
  -                count++;
  -                th = JahiaErrorDisplay.getNestedException(th);
  -                logger.error("Nested exception " + count, th);
  -            }
  +            th = JahiaErrorDisplay.getNestedException(th);
  +            logger.error("Nested exception ", th);
               return "Error while retrieving application " + appBean.getName 
();
           }
   
  

Reply via email to