[jboss-cvs] JBossCache/src/org/jboss/cache/pojo ...

Elias Ross genman at noderunner.net
Thu Jan 25 16:54:05 EST 2007


  User: genman  
  Date: 07/01/25 16:54:05

  Modified:    src/org/jboss/cache/pojo    MethodDeclarations.java
                        PojoTxSynchronizationHandler.java PojoUtil.java
  Log:
  JBCACHE-952 -  Replace calls to Throwable.printStackTace with logging
  
  Revision  Changes    Path
  1.2       +3 -4      JBossCache/src/org/jboss/cache/pojo/MethodDeclarations.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: MethodDeclarations.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/pojo/MethodDeclarations.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- MethodDeclarations.java	13 Jan 2007 15:55:01 -0000	1.1
  +++ MethodDeclarations.java	25 Jan 2007 21:54:05 -0000	1.2
  @@ -20,7 +20,7 @@
    * Method declarations for rollback method mostly.
    *
    * @author Ben Wang
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class MethodDeclarations
   {
  @@ -60,10 +60,9 @@
              undoDecrementReferenceCount = PojoUtil.class.getDeclaredMethod("undoDecrementReferenceCount",
                      new Class[] {Fqn.class, int.class, List.class});
           }
  -        catch (NoSuchMethodException ex)
  +        catch (NoSuchMethodException e)
           {
  -            ex.printStackTrace();
  -            throw new ExceptionInInitializerError(ex.toString());
  +            throw new ExceptionInInitializerError(e);
           }
       }
   }
  
  
  
  1.2       +4 -4      JBossCache/src/org/jboss/cache/pojo/PojoTxSynchronizationHandler.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: PojoTxSynchronizationHandler.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/pojo/PojoTxSynchronizationHandler.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- PojoTxSynchronizationHandler.java	13 Jan 2007 15:55:01 -0000	1.1
  +++ PojoTxSynchronizationHandler.java	25 Jan 2007 21:54:05 -0000	1.2
  @@ -24,7 +24,7 @@
    * Handling the rollback operation for PojoCache level, specifically interceptor add/remove, etc.
    *
    * @author Ben Wang
  - * @version $Id: PojoTxSynchronizationHandler.java,v 1.1 2007/01/13 15:55:01 bwang Exp $
  + * @version $Id: PojoTxSynchronizationHandler.java,v 1.2 2007/01/25 21:54:05 genman Exp $
    */
   
   public class PojoTxSynchronizationHandler implements Synchronization
  @@ -75,11 +75,11 @@
            try
            {
               mc.invoke();
  -         } catch (Throwable throwable)
  +         }
  +         catch (Throwable t)
            {
  -            throwable.printStackTrace();
               throw new PojoCacheException(
  -                    "PojoTxSynchronizationHandler.runRollbackPhase(): error: " +throwable.toString());
  +                    "PojoTxSynchronizationHandler.runRollbackPhase(): error: " + t, t);
            }
         }
      }
  
  
  
  1.2       +2 -3      JBossCache/src/org/jboss/cache/pojo/PojoUtil.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: PojoUtil.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/pojo/PojoUtil.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- PojoUtil.java	13 Jan 2007 15:55:01 -0000	1.1
  +++ PojoUtil.java	25 Jan 2007 21:54:05 -0000	1.2
  @@ -27,7 +27,7 @@
    * Utility class for method wrappers that we are interested to rollback (i.e., rollback).
    *
    * @author Ben Wang
  - * @version $Id: PojoUtil.java,v 1.1 2007/01/13 15:55:01 bwang Exp $
  + * @version $Id: PojoUtil.java,v 1.2 2007/01/25 21:54:05 genman Exp $
    */
   public class PojoUtil
   {
  @@ -104,9 +104,8 @@
               }
               catch (ParseException e)
               {
  -               e.printStackTrace();
                  throw new PojoCacheException("PojoUtil._attachInterceptor(): can't parse the field binding: "
  -                       + e);
  +                       + e, e);
               }
               binding.addInterceptor(ReentrancyStopperInterceptor.class);
               getInstanceDomain(pojo).addBinding(binding);
  
  
  



More information about the jboss-cvs-commits mailing list