db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker PersistenceBrokerException.java
Date Sat, 22 May 2004 09:51:26 GMT
brj         2004/05/22 02:51:26

  Modified:    src/java/org/apache/ojb/broker/util/collections
                        ManageableArrayList.java ManageableHashSet.java
                        ManageableHashMap.java ManageableVector.java
               src/java/org/apache/ojb/broker/core
                        PersistenceBrokerFactoryDefaultImpl.java
                        QueryReferenceBroker.java
                        DelegatingPersistenceBroker.java
               src/java/org/apache/ojb/broker/util ClassHelper.java
                        ReferenceMap.java
               src/java/org/apache/ojb/broker/accesslayer/sql
                        SqlQueryStatement.java
               src/java/org/apache/ojb/broker/cache
                        ObjectCacheDefaultImpl.java TwoLevelCache.java
                        ObjectCacheEmptyImpl.java
                        ObjectCachePerBrokerImpl.java
               src/java/org/apache/ojb/broker/accesslayer
                        ResultSetAndStatement.java PkIterator.java
                        ChainingIterator.java
                        ConnectionFactoryPooledImpl.java RsIterator.java
               src/java/org/apache/ojb/broker
                        PersistenceBrokerException.java
  Log:
  commenting empty blocks
  
  Revision  Changes    Path
  1.7       +2 -1      db-ojb/src/java/org/apache/ojb/broker/util/collections/ManageableArrayList.java
  
  Index: ManageableArrayList.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/util/collections/ManageableArrayList.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ManageableArrayList.java	4 Apr 2004 23:53:37 -0000	1.6
  +++ ManageableArrayList.java	22 May 2004 09:51:25 -0000	1.7
  @@ -53,6 +53,7 @@
   
       public void afterStore(PersistenceBroker broker) throws PersistenceBrokerException
       {
  +        //do nothing
       }
   
       /**
  
  
  
  1.7       +2 -1      db-ojb/src/java/org/apache/ojb/broker/util/collections/ManageableHashSet.java
  
  Index: ManageableHashSet.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/util/collections/ManageableHashSet.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ManageableHashSet.java	4 Apr 2004 23:53:37 -0000	1.6
  +++ ManageableHashSet.java	22 May 2004 09:51:25 -0000	1.7
  @@ -53,6 +53,7 @@
   
       public void afterStore(PersistenceBroker broker) throws PersistenceBrokerException
       {
  +        //do nothing
       }
   
       /**
  
  
  
  1.6       +1 -0      db-ojb/src/java/org/apache/ojb/broker/util/collections/ManageableHashMap.java
  
  Index: ManageableHashMap.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/util/collections/ManageableHashMap.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ManageableHashMap.java	4 Apr 2004 23:53:37 -0000	1.5
  +++ ManageableHashMap.java	22 May 2004 09:51:25 -0000	1.6
  @@ -55,5 +55,6 @@
   
   	public void afterStore(PersistenceBroker broker) throws PersistenceBrokerException
   	{
  +        //do nothing
   	}
   }
  
  
  
  1.7       +2 -1      db-ojb/src/java/org/apache/ojb/broker/util/collections/ManageableVector.java
  
  Index: ManageableVector.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/util/collections/ManageableVector.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ManageableVector.java	4 Apr 2004 23:53:37 -0000	1.6
  +++ ManageableVector.java	22 May 2004 09:51:25 -0000	1.7
  @@ -53,6 +53,7 @@
   
       public void afterStore(PersistenceBroker broker) throws PersistenceBrokerException
       {
  +        //do nothing
       }
   
       /**
  
  
  
  1.10      +2 -1      db-ojb/src/java/org/apache/ojb/broker/core/PersistenceBrokerFactoryDefaultImpl.java
  
  Index: PersistenceBrokerFactoryDefaultImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/core/PersistenceBrokerFactoryDefaultImpl.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- PersistenceBrokerFactoryDefaultImpl.java	4 Apr 2004 23:53:33 -0000	1.9
  +++ PersistenceBrokerFactoryDefaultImpl.java	22 May 2004 09:51:25 -0000	1.10
  @@ -113,6 +113,7 @@
               }
               catch (Exception ignore)
               {
  +                //ignore it
               }
               throw new PBFactoryException("Borrow broker from pool failed, using PBKey "
+ pbKey, e);
           }
  
  
  
  1.17      +3 -1      db-ojb/src/java/org/apache/ojb/broker/core/QueryReferenceBroker.java
  
  Index: QueryReferenceBroker.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/core/QueryReferenceBroker.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- QueryReferenceBroker.java	13 May 2004 10:05:43 -0000	1.16
  +++ QueryReferenceBroker.java	22 May 2004 09:51:25 -0000	1.17
  @@ -809,6 +809,7 @@
   
           public void afterMaterialization(IndirectionHandler handler, Object materializedObject)
           {
  +            //do nothing            
           }
       }
   
  @@ -931,6 +932,7 @@
   
           public void afterLoading(CollectionProxyDefaultImpl col)
           {
  +            //do nothing
           }
       }
   }
  
  
  
  1.11      +1 -0      db-ojb/src/java/org/apache/ojb/broker/core/DelegatingPersistenceBroker.java
  
  Index: DelegatingPersistenceBroker.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/core/DelegatingPersistenceBroker.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- DelegatingPersistenceBroker.java	4 Apr 2004 23:53:33 -0000	1.10
  +++ DelegatingPersistenceBroker.java	22 May 2004 09:51:25 -0000	1.11
  @@ -272,6 +272,7 @@
   
   	public void removeListener(PBListener listener) throws PersistenceBrokerException
   	{
  +        //do nothing	    
   	}
   
   	public Class getTopLevelClass(Class clazz) throws PersistenceBrokerException
  
  
  
  1.9       +2 -1      db-ojb/src/java/org/apache/ojb/broker/util/ClassHelper.java
  
  Index: ClassHelper.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/util/ClassHelper.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ClassHelper.java	6 May 2004 18:54:44 -0000	1.8
  +++ ClassHelper.java	22 May 2004 09:51:25 -0000	1.9
  @@ -245,6 +245,7 @@
           }
           catch(Exception ignore)
           {
  +            //ignore it
           }
           return method;
       }
  
  
  
  1.6       +5 -2      db-ojb/src/java/org/apache/ojb/broker/util/ReferenceMap.java
  
  Index: ReferenceMap.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/util/ReferenceMap.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ReferenceMap.java	4 Apr 2004 23:53:37 -0000	1.5
  +++ ReferenceMap.java	22 May 2004 09:51:25 -0000	1.6
  @@ -608,7 +608,10 @@
       {
           Arrays.fill(table, null);
           size = 0;
  -        while (queue.poll() != null) ; // drain the queue
  +        while (queue.poll() != null)
  +        {
  +            // drain the queue
  +        }
       }
   
   
  
  
  
  1.75      +2 -5      db-ojb/src/java/org/apache/ojb/broker/accesslayer/sql/SqlQueryStatement.java
  
  Index: SqlQueryStatement.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/sql/SqlQueryStatement.java,v
  retrieving revision 1.74
  retrieving revision 1.75
  diff -u -r1.74 -r1.75
  --- SqlQueryStatement.java	22 May 2004 08:37:24 -0000	1.74
  +++ SqlQueryStatement.java	22 May 2004 09:51:25 -0000	1.75
  @@ -1631,10 +1631,7 @@
               buildJoinTree(whereCrit);
           }
   
  -        if (havingCrit == null || havingCrit.isEmpty())
  -        {
  -        }
  -        else
  +        if (havingCrit != null && !havingCrit.isEmpty())
           {
               buildJoinTree(havingCrit);
           }
  
  
  
  1.23      +6 -1      db-ojb/src/java/org/apache/ojb/broker/cache/ObjectCacheDefaultImpl.java
  
  Index: ObjectCacheDefaultImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/cache/ObjectCacheDefaultImpl.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- ObjectCacheDefaultImpl.java	4 Apr 2004 23:53:33 -0000	1.22
  +++ ObjectCacheDefaultImpl.java	22 May 2004 09:51:25 -0000	1.23
  @@ -273,22 +273,27 @@
   
       public void afterRollback(PBStateEvent event)
       {
  +        //do nothing
       }
   
       public void afterCommit(PBStateEvent event)
       {
  +        //do nothing
       }
   
       public void afterBegin(PBStateEvent event)
       {
  +        //do nothing
       }
   
       public void beforeBegin(PBStateEvent event)
       {
  +        //do nothing
       }
   
       public void afterOpen(PBStateEvent event)
       {
  +        //do nothing
       }
   
       //-----------------------------------------------------------
  
  
  
  1.6       +4 -0      db-ojb/src/java/org/apache/ojb/broker/cache/TwoLevelCache.java
  
  Index: TwoLevelCache.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/cache/TwoLevelCache.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TwoLevelCache.java	9 Apr 2004 13:22:30 -0000	1.5
  +++ TwoLevelCache.java	22 May 2004 09:51:25 -0000	1.6
  @@ -421,18 +421,22 @@
   
     public void afterOpen(PBStateEvent event)
     {
  +      //do nothing
     }
   
     public void beforeBegin(PBStateEvent event)
     {
  +      //do nothing
     }
   
     public void afterBegin(PBStateEvent event)
     {
  +      //do nothing
     }
   
     public void beforeCommit(PBStateEvent event)
     {
  +      //do nothing
     }
   
     public void afterCommit(PBStateEvent event)
  
  
  
  1.13      +4 -4      db-ojb/src/java/org/apache/ojb/broker/cache/ObjectCacheEmptyImpl.java
  
  Index: ObjectCacheEmptyImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/cache/ObjectCacheEmptyImpl.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- ObjectCacheEmptyImpl.java	4 Apr 2004 23:53:33 -0000	1.12
  +++ ObjectCacheEmptyImpl.java	22 May 2004 09:51:25 -0000	1.13
  @@ -64,7 +64,7 @@
        */
       public void cache(Identity oid, Object obj)
       {
  -
  +        //do nothing
       }
   
       /**
  @@ -80,7 +80,7 @@
        */
       public void remove(Identity oid)
       {
  -
  +        //do nothing
       }
   
       /**
  @@ -88,7 +88,7 @@
        */
       public void clear()
       {
  -
  +        //do nothing
       }
   
       public String toString()
  
  
  
  1.11      +8 -2      db-ojb/src/java/org/apache/ojb/broker/cache/ObjectCachePerBrokerImpl.java
  
  Index: ObjectCachePerBrokerImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/cache/ObjectCachePerBrokerImpl.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ObjectCachePerBrokerImpl.java	4 Apr 2004 23:53:33 -0000	1.10
  +++ ObjectCachePerBrokerImpl.java	22 May 2004 09:51:25 -0000	1.11
  @@ -129,27 +129,33 @@
   
       public void afterOpen(PBStateEvent event)
       {
  +        //do nothing
       }
   
       public void beforeBegin(PBStateEvent event)
       {
  +        //do nothing
       }
   
       public void afterBegin(PBStateEvent event)
       {
  +        //do nothing
       }
   
       public void beforeCommit(PBStateEvent event)
       {
  +        //do nothing
       }
   
       public void afterCommit(PBStateEvent event)
       {
  +        //do nothing
       }
   
       public void beforeRollback(PBStateEvent event)
       {
  -    }
  +        //do nothing
  +   }
   
       public void afterRollback(PBStateEvent event)
       {
  
  
  
  1.13      +2 -1      db-ojb/src/java/org/apache/ojb/broker/accesslayer/ResultSetAndStatement.java
  
  Index: ResultSetAndStatement.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/ResultSetAndStatement.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- ResultSetAndStatement.java	4 Apr 2004 23:53:31 -0000	1.12
  +++ ResultSetAndStatement.java	22 May 2004 09:51:25 -0000	1.13
  @@ -106,6 +106,7 @@
               }
               catch (Exception ignore)
               {
  +                //ignore it                
               }
           }
       }
  
  
  
  1.8       +2 -1      db-ojb/src/java/org/apache/ojb/broker/accesslayer/PkIterator.java
  
  Index: PkIterator.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/PkIterator.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- PkIterator.java	4 Apr 2004 23:53:31 -0000	1.7
  +++ PkIterator.java	22 May 2004 09:51:26 -0000	1.8
  @@ -44,5 +44,6 @@
   
       public void remove()
       {
  +        //do nothing
       }
   }
  
  
  
  1.13      +1 -4      db-ojb/src/java/org/apache/ojb/broker/accesslayer/ChainingIterator.java
  
  Index: ChainingIterator.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/ChainingIterator.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- ChainingIterator.java	4 Apr 2004 23:53:30 -0000	1.12
  +++ ChainingIterator.java	22 May 2004 09:51:26 -0000	1.13
  @@ -274,9 +274,6 @@
                   movedToRelative = true;
               }
           }
  -        else if (row < 0)
  -        {
  -        }
   
           return retval;
       }
  
  
  
  1.11      +2 -1      db-ojb/src/java/org/apache/ojb/broker/accesslayer/ConnectionFactoryPooledImpl.java
  
  Index: ConnectionFactoryPooledImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/ConnectionFactoryPooledImpl.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ConnectionFactoryPooledImpl.java	4 Apr 2004 23:53:30 -0000	1.10
  +++ ConnectionFactoryPooledImpl.java	22 May 2004 09:51:26 -0000	1.11
  @@ -240,6 +240,7 @@
               }
               catch (SQLException e)
               {
  +                //ignore it
               }
           }
       }
  
  
  
  1.63      +7 -1      db-ojb/src/java/org/apache/ojb/broker/accesslayer/RsIterator.java
  
  Index: RsIterator.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/RsIterator.java,v
  retrieving revision 1.62
  retrieving revision 1.63
  diff -u -r1.62 -r1.63
  --- RsIterator.java	9 Apr 2004 13:22:28 -0000	1.62
  +++ RsIterator.java	22 May 2004 09:51:26 -0000	1.63
  @@ -581,6 +581,7 @@
           }
           catch (SQLException e)
           {
  +            //ignore it
           }
           if (!supportsAdvancedJDBCCursorControl()
                   || getBroker().serviceConnectionManager().getSupportedPlatform().useCountForResultsetSize()
  @@ -1014,18 +1015,23 @@
   
           public void afterCommit(PBStateEvent event)
           {
  +            //do nothing
           }
           public void afterRollback(PBStateEvent event)
           {
  +            //do nothing
           }
           public void afterBegin(PBStateEvent event)
           {
  +            //do nothing
           }
           public void beforeBegin(PBStateEvent event)
           {
  +            //do nothing
           }
           public void afterOpen(PBStateEvent event)
           {
  +            //do nothing
           }
       }
   
  
  
  
  1.9       +50 -22    db-ojb/src/java/org/apache/ojb/broker/PersistenceBrokerException.java
  
  Index: PersistenceBrokerException.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/PersistenceBrokerException.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- PersistenceBrokerException.java	4 Apr 2004 23:53:30 -0000	1.8
  +++ PersistenceBrokerException.java	22 May 2004 09:51:26 -0000	1.9
  @@ -51,7 +51,8 @@
           super(message);
       }
   
  -    public PersistenceBrokerException(String message, Throwable cause) {
  +    public PersistenceBrokerException(String message, Throwable cause)
  +    {
           super(message, cause);
           setSourceException(cause);
       }
  @@ -76,39 +77,66 @@
       public Throwable getSourceException()
       {
           Method getCause = null;
  -        try {
  -            getCause = getClass().getMethod("getCause", new Class[] { });
  -        } catch (NoSuchMethodException e) {
  -        } catch (SecurityException e) {
  +        try
  +        {
  +            getCause = getClass().getMethod("getCause", new Class[]{});
  +        }
  +        catch (NoSuchMethodException e)
  +        {
  +            //ignore it
  +        }
  +        catch (SecurityException e)
  +        {
  +            //ignore it
           }
   
  -        if (getCause != null) {
  -            try {
  -                return (Throwable) getCause.invoke(this, new Object[] { } );
  -            } catch (Throwable e) {
  +        if (getCause != null)
  +        {
  +            try
  +            {
  +                return (Throwable) getCause.invoke(this, new Object[]{});
  +            }
  +            catch (Throwable e)
  +            {
                   return sourceException;
               }
  -        } else {
  +        }
  +        else
  +        {
               return sourceException;
           }
       }
   
  -    private void setSourceException(Throwable cause) {
  +    private void setSourceException(Throwable cause)
  +    {
           Method initCause = null;
  -        try {
  -            initCause = getClass().getMethod("initCause", new Class[] { Throwable.class
});
  -        } catch (NoSuchMethodException e) {
  -        } catch (SecurityException e) {
  +        try
  +        {
  +            initCause = getClass().getMethod("initCause", new Class[]{Throwable.class});
  +        }
  +        catch (NoSuchMethodException e)
  +        {
  +            //ignore it
  +        }
  +        catch (SecurityException e)
  +        {
  +            //ignore it
           }
   
  -        if (initCause != null) {
  -            try {
  -                initCause.invoke(this, new Object[] { cause } );
  -            } catch (Throwable e) {
  +        if (initCause != null)
  +        {
  +            try
  +            {
  +                initCause.invoke(this, new Object[]{cause});
  +            }
  +            catch (Throwable e)
  +            {
                   sourceException = cause;
               }
  -        } else {
  +        }
  +        else
  +        {
               sourceException = cause;
           }
       }
  -}
  +}
  \ No newline at end of file
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message