db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/util/interceptor InterceptorFactory.java
Date Sat, 13 Dec 2003 14:34:24 GMT
thma        2003/12/13 06:34:24

  Modified:    src/java/org/apache/ojb/odmg/locking
                        PersistentLockMapImpl.java LockStrategyFactory.java
               src/java/org/apache/ojb/tools/mapping/reversedb2/dnd2
                        ReverseDbNodesDragWorker.java
               src/java/org/apache/ojb/odmg/collections DListEntry_2.java
               src/java/org/apache/ojb/odmg NarrowTransaction.java
               src/java/org/apache/ojb/broker/util/interceptor
                        InterceptorFactory.java
  Log:
  apply Rober S. Feir's patch (eliminate useless casts, etc)
  
  Revision  Changes    Path
  1.9       +1 -2      db-ojb/src/java/org/apache/ojb/odmg/locking/PersistentLockMapImpl.java
  
  Index: PersistentLockMapImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/odmg/locking/PersistentLockMapImpl.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- PersistentLockMapImpl.java	6 Feb 2003 21:14:13 -0000	1.8
  +++ PersistentLockMapImpl.java	13 Dec 2003 14:34:23 -0000	1.9
  @@ -70,7 +70,6 @@
   import org.apache.ojb.broker.query.QueryFactory;
   import org.apache.ojb.broker.util.logging.Logger;
   import org.apache.ojb.broker.util.logging.LoggerFactory;
  -import org.apache.ojb.odmg.HasBroker;
   import org.apache.ojb.odmg.TransactionImpl;
   import org.apache.ojb.odmg.TxManagerFactory;
   
  @@ -83,7 +82,7 @@
        */
       private PersistenceBroker getBroker()
       {
  -        return ((HasBroker) TxManagerFactory.instance().getCurrentTransaction()).getBroker();
  +        return TxManagerFactory.instance().getCurrentTransaction().getBroker();
       }
   
       /**
  
  
  
  1.10      +2 -3      db-ojb/src/java/org/apache/ojb/odmg/locking/LockStrategyFactory.java
  
  Index: LockStrategyFactory.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/odmg/locking/LockStrategyFactory.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- LockStrategyFactory.java	10 Mar 2003 06:07:20 -0000	1.9
  +++ LockStrategyFactory.java	13 Dec 2003 14:34:23 -0000	1.10
  @@ -58,7 +58,6 @@
   import org.apache.ojb.broker.metadata.ClassDescriptor;
   import org.apache.ojb.broker.metadata.IsolationLevels;
   import org.apache.ojb.broker.util.ProxyHelper;
  -import org.apache.ojb.odmg.HasBroker;
   import org.apache.ojb.odmg.TxManagerFactory;
   
   /**
  @@ -120,7 +119,7 @@
   
           try
           {
  -            ClassDescriptor cld = ((HasBroker) TxManagerFactory.instance().getCurrentTransaction()).getBroker().getClassDescriptor(c);
  +            ClassDescriptor cld = TxManagerFactory.instance().getCurrentTransaction().getBroker().getClassDescriptor(c);
               isolationLevel = cld.getIsolationLevel();
           }
           catch (PersistenceBrokerException e)
  
  
  
  1.7       +2 -2      db-ojb/src/java/org/apache/ojb/tools/mapping/reversedb2/dnd2/ReverseDbNodesDragWorker.java
  
  Index: ReverseDbNodesDragWorker.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/tools/mapping/reversedb2/dnd2/ReverseDbNodesDragWorker.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ReverseDbNodesDragWorker.java	12 Dec 2003 16:37:16 -0000	1.6
  +++ ReverseDbNodesDragWorker.java	13 Dec 2003 14:34:23 -0000	1.7
  @@ -117,7 +117,7 @@
                       for (int i = 0; jtree.getSelectionPaths() != null && i <
jtree.getSelectionPaths().length; i++)
                       {
                           System.err.println("   adding Node" + jtree.getSelectionPaths()[i].getLastPathComponent());
  -                        selectedNodes[i] = (ReverseDbTreeNode)jtree.getSelectionPaths()[i].getLastPathComponent();
  +                        selectedNodes[i] = (ReverseDbTreeNode) jtree.getSelectionPaths()[i].getLastPathComponent();
                       }
                       return new TransferableDBMetaTreeNodes(selectedNodes);
                   }
  
  
  
  1.2       +2 -2      db-ojb/src/java/org/apache/ojb/odmg/collections/DListEntry_2.java
  
  Index: DListEntry_2.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/odmg/collections/DListEntry_2.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DListEntry_2.java	6 Aug 2003 00:20:13 -0000	1.1
  +++ DListEntry_2.java	13 Dec 2003 14:34:23 -0000	1.2
  @@ -158,7 +158,7 @@
           }
           else
           {
  -            TransactionExt tx = (TransactionExt) TxManagerFactory.instance().getTransaction();
  +            TransactionExt tx = TxManagerFactory.instance().getTransaction();
               if (tx != null && tx.isOpen())
               {
                   prepareRealSubject(tx.getBroker());
  
  
  
  1.7       +1 -5      db-ojb/src/java/org/apache/ojb/odmg/NarrowTransaction.java
  
  Index: NarrowTransaction.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/odmg/NarrowTransaction.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- NarrowTransaction.java	3 Oct 2003 12:39:40 -0000	1.6
  +++ NarrowTransaction.java	13 Dec 2003 14:34:23 -0000	1.7
  @@ -39,11 +39,7 @@
        */
       public PersistenceBroker getBroker()
       {
  -        if(this.tx instanceof HasBroker)
  -        {
  -            return ((HasBroker)this.tx).getBroker();
  -        }
  -        return null;
  +        return tx.getBroker();
       }
   
       /**
  
  
  
  1.6       +1 -2      db-ojb/src/java/org/apache/ojb/broker/util/interceptor/InterceptorFactory.java
  
  Index: InterceptorFactory.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/util/interceptor/InterceptorFactory.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- InterceptorFactory.java	2 Mar 2003 22:37:06 -0000	1.5
  +++ InterceptorFactory.java	13 Dec 2003 14:34:23 -0000	1.6
  @@ -16,7 +16,6 @@
   import org.apache.ojb.broker.util.configuration.Configurable;
   import org.apache.ojb.broker.util.configuration.Configuration;
   import org.apache.ojb.broker.util.configuration.ConfigurationException;
  -import org.apache.ojb.broker.util.configuration.impl.OjbConfiguration;
   import org.apache.ojb.broker.util.configuration.impl.OjbConfigurator;
   import org.apache.ojb.broker.util.logging.LoggerFactory;
   import org.apache.ojb.broker.util.ClassHelper;
  @@ -52,7 +51,7 @@
   	 */
   	public void configure(Configuration pConfig) throws ConfigurationException
   	{
  -		Class clazz = ((OjbConfiguration) pConfig).getClass("InterceptorClass", null);
  +		Class clazz = pConfig.getClass("InterceptorClass", null);
   		setInterceptorClassToBeUsed(clazz);
   	}
   
  
  
  

---------------------------------------------------------------------
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