commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mpoes...@apache.org
Subject cvs commit: jakarta-commons-sandbox/jdbc2pool project.xml
Date Tue, 16 Jul 2002 18:40:36 GMT
mpoeschl    2002/07/16 11:40:36

  Modified:    jdbc2pool/src/java/org/apache/commons/jdbc2pool
                        UserPassKey.java TorqueClassicDataSource.java
                        PoolKey.java Jdbc2PoolDataSource.java
               jdbc2pool project.xml
  Log:
  upgrade to latest commons-lang
  
  Revision  Changes    Path
  1.2       +31 -31    jakarta-commons-sandbox/jdbc2pool/src/java/org/apache/commons/jdbc2pool/UserPassKey.java
  
  Index: UserPassKey.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jdbc2pool/src/java/org/apache/commons/jdbc2pool/UserPassKey.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- UserPassKey.java	19 May 2002 23:28:13 -0000	1.1
  +++ UserPassKey.java	16 Jul 2002 18:40:35 -0000	1.2
  @@ -25,13 +25,13 @@
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
    *
  - * 4. The names "Apache" and "Apache Software Foundation" and 
  - *    "Apache Turbine" must not be used to endorse or promote products 
  - *    derived from this software without prior written permission. For 
  + * 4. The names "Apache" and "Apache Software Foundation" and
  + *    "Apache Turbine" must not be used to endorse or promote products
  + *    derived from this software without prior written permission. For
    *    written permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  - *    "Apache Turbine", nor may "Apache" appear in their name, without 
  + *    "Apache Turbine", nor may "Apache" appear in their name, without
    *    prior written permission of the Apache Software Foundation.
    *
    * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  @@ -53,9 +53,9 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  - 
  +
   import java.io.Serializable;
  -import org.apache.commons.lang.Objects;
  +import org.apache.commons.lang.ObjectUtils;
   import org.apache.commons.pool.BasePoolableObjectFactory;
   
   class UserPassKey
  @@ -64,75 +64,75 @@
       private String password;
       private boolean reusable;
       private String username;
  -    
  +
       UserPassKey()
       {
       }
  -        
  +
       /**
        * Get the value of password.
        * @return value of password.
        */
  -    public String getPassword() 
  +    public String getPassword()
       {
           return password;
       }
  -    
  +
       /**
        * Set the value of password.
        * @param v  Value to assign to password.
        */
  -    public void setPassword(String  v) 
  +    public void setPassword(String  v)
       {
           this.password = v;
       }
  -    
  -    
  +
  +
       /**
        * Get the value of reusable.
        * @return value of reusable.
        */
  -    public boolean isReusable() 
  +    public boolean isReusable()
       {
           return reusable;
       }
  -    
  +
       /**
        * Set the value of reusable.
        * @param v  Value to assign to reusable.
        */
  -    public void setReusable(boolean  v) 
  +    public void setReusable(boolean  v)
       {
           this.reusable = v;
       }
   
  -    
  +
       /**
        * Get the value of username.
        * @return value of username.
        */
  -    public String getUsername() 
  +    public String getUsername()
       {
           return username;
       }
  -    
  +
       /**
        * Set the value of username.
        * @param v  Value to assign to username.
        */
  -    public void setUsername(String  v) 
  +    public void setUsername(String  v)
       {
           this.username = v;
       }
  -    
  +
       /**
        * Initialize key for method with no arguments.
        *
  -     * @param instanceOrClass the Object on which the method is invoked.  if 
  +     * @param instanceOrClass the Object on which the method is invoked.  if
        * the method is static, a String representing the class name is used.
        * @param method the method name
        */
  -    void init(String username, String password) 
  +    void init(String username, String password)
       {
           this.reusable = true;
           this.username = username;
  @@ -142,11 +142,11 @@
       public boolean equals(Object obj)
       {
           boolean equal = false;
  -        if ( obj instanceof UserPassKey ) 
  +        if ( obj instanceof UserPassKey )
           {
               UserPassKey upk = (UserPassKey)obj;
  -            equal = Objects.equals(upk.username, username);
  -        }            
  +            equal = ObjectUtils.equals(upk.username, username);
  +        }
   
           return equal;
       }
  @@ -154,7 +154,7 @@
       public int hashCode()
       {
           int h = 0;
  -        if (username != null) 
  +        if (username != null)
           {
               h = username.hashCode();
           }
  @@ -173,24 +173,24 @@
   
       // ************* PoolableObjectFactory implementation *******************
   
  -    static class Factory 
  +    static class Factory
           extends BasePoolableObjectFactory
       {
           /**
            * Creates an instance that can be returned by the pool.
            * @return an instance that can be returned by the pool.
            */
  -        public Object makeObject() 
  +        public Object makeObject()
               throws Exception
           {
               return new UserPassKey();
           }
  -        
  +
           /**
            * Uninitialize an instance to be returned to the pool.
            * @param obj the instance to be passivated
            */
  -        public void passivateObject(Object obj) 
  +        public void passivateObject(Object obj)
               throws Exception
           {
               UserPassKey key = (UserPassKey)obj;
  
  
  
  1.7       +6 -6      jakarta-commons-sandbox/jdbc2pool/src/java/org/apache/commons/jdbc2pool/TorqueClassicDataSource.java
  
  Index: TorqueClassicDataSource.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jdbc2pool/src/java/org/apache/commons/jdbc2pool/TorqueClassicDataSource.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TorqueClassicDataSource.java	5 Jul 2002 08:34:05 -0000	1.6
  +++ TorqueClassicDataSource.java	16 Jul 2002 18:40:35 -0000	1.7
  @@ -74,7 +74,7 @@
   import javax.naming.spi.ObjectFactory;
   import javax.sql.ConnectionPoolDataSource;
   import javax.sql.DataSource;
  -import org.apache.commons.lang.Serialization;
  +import org.apache.commons.lang.SerializationUtils;
   
   /**
    * Torque's default connection pool DataSource
  @@ -557,7 +557,7 @@
           // BinaryRefAddr does not allow null byte[].
           if ( jndiEnvironment != null )
           {
  -            serJndiEnv = Serialization.serialize(jndiEnvironment);
  +            serJndiEnv = SerializationUtils.serialize(jndiEnvironment);
               ref.add(new BinaryRefAddr("jndiEnvironment", serJndiEnv));
           }
   
  @@ -565,7 +565,7 @@
           // BinaryRefAddr does not allow null byte[].
           if ( getPerUserMaxConnections() != null )
           {
  -            serPUMC = Serialization.serialize(getPerUserMaxConnections());
  +            serPUMC = SerializationUtils.serialize(getPerUserMaxConnections());
               ref.add(new BinaryRefAddr("perUserMaxConnections", serPUMC));
           }
   
  @@ -599,7 +599,7 @@
               if ( refAddr != null )
               {
                   byte[] serialized = (byte[])refAddr.getContent();
  -                jndiEnvironment = (Properties)Serialization.deserialize(serialized);
  +                jndiEnvironment = (Properties)SerializationUtils.deserialize(serialized);
               }
   
               refAddr = ref.get("perUserMaxConnections");
  @@ -607,7 +607,7 @@
               {
                   byte[] serialized = (byte[])refAddr.getContent();
                   setPerUserMaxConnections(
  -                    (Properties)Serialization.deserialize(serialized) );
  +                    (Properties)SerializationUtils.deserialize(serialized) );
               }
   
               return this;
  
  
  
  1.2       +28 -28    jakarta-commons-sandbox/jdbc2pool/src/java/org/apache/commons/jdbc2pool/PoolKey.java
  
  Index: PoolKey.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jdbc2pool/src/java/org/apache/commons/jdbc2pool/PoolKey.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PoolKey.java	19 May 2002 23:28:13 -0000	1.1
  +++ PoolKey.java	16 Jul 2002 18:40:35 -0000	1.2
  @@ -25,13 +25,13 @@
    *    Alternately, this acknowledgment may appear in the software itself,
    *    if and wherever such third-party acknowledgments normally appear.
    *
  - * 4. The names "Apache" and "Apache Software Foundation" and 
  - *    "Apache Turbine" must not be used to endorse or promote products 
  - *    derived from this software without prior written permission. For 
  + * 4. The names "Apache" and "Apache Software Foundation" and
  + *    "Apache Turbine" must not be used to endorse or promote products
  + *    derived from this software without prior written permission. For
    *    written permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  - *    "Apache Turbine", nor may "Apache" appear in their name, without 
  + *    "Apache Turbine", nor may "Apache" appear in their name, without
    *    prior written permission of the Apache Software Foundation.
    *
    * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  @@ -53,9 +53,9 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  - 
  +
   import java.io.Serializable;
  -import org.apache.commons.lang.Objects;
  +import org.apache.commons.lang.ObjectUtils;
   import org.apache.commons.pool.BasePoolableObjectFactory;
   
   class PoolKey
  @@ -64,56 +64,56 @@
       private String datasourceName;
       private boolean reusable;
       private String username;
  -    
  +
       PoolKey()
       {
       }
  -        
  +
       /* *
        * Get the value of datasourceName.
        * @return value of datasourceName.
        * /
  -    public String getDatasourceName() 
  +    public String getDatasourceName()
       {
           return datasourceName;
       }
  -    
  +
       /* *
        * Set the value of datasourceName.
        * @param v  Value to assign to datasourceName.
        * /
  -    public void setDatasourceName(String  v) 
  +    public void setDatasourceName(String  v)
       {
           this.datasourceName = v;
       }
  -    
  +
       /* *
        * Get the value of username.
        * @return value of username.
        * /
  -    public String getUsername() 
  +    public String getUsername()
       {
           return username;
       }
  -    
  +
       /* *
        * Set the value of username.
        * @param v  Value to assign to username.
        * /
  -    public void setUsername(String  v) 
  +    public void setUsername(String  v)
       {
           this.username = v;
       }
  -    */    
  +    */
   
       /**
        * Initialize key for method with no arguments.
        *
  -     * @param instanceOrClass the Object on which the method is invoked.  if 
  +     * @param instanceOrClass the Object on which the method is invoked.  if
        * the method is static, a String representing the class name is used.
        * @param method the method name
        */
  -    void init(String username, String datasourceName) 
  +    void init(String username, String datasourceName)
       {
           this.datasourceName = datasourceName;
           this.username = username;
  @@ -122,12 +122,12 @@
       public boolean equals(Object obj)
       {
           boolean equal = false;
  -        if ( obj instanceof PoolKey ) 
  +        if ( obj instanceof PoolKey )
           {
               PoolKey pk = (PoolKey)obj;
  -            equal = Objects.equals(pk.datasourceName, datasourceName);
  -            equal &= Objects.equals(pk.username, username);
  -        }            
  +            equal = ObjectUtils.equals(pk.datasourceName, datasourceName);
  +            equal &= ObjectUtils.equals(pk.username, username);
  +        }
   
           return equal;
       }
  @@ -135,11 +135,11 @@
       public int hashCode()
       {
           int h = 0;
  -        if (datasourceName != null) 
  +        if (datasourceName != null)
           {
               h += datasourceName.hashCode();
           }
  -        if (username != null) 
  +        if (username != null)
           {
               h += username.hashCode();
           }
  @@ -157,24 +157,24 @@
   
       // ************* PoolableObjectFactory implementation *******************
   
  -    static class Factory 
  +    static class Factory
           extends BasePoolableObjectFactory
       {
           /**
            * Creates an instance that can be returned by the pool.
            * @return an instance that can be returned by the pool.
            */
  -        public Object makeObject() 
  +        public Object makeObject()
               throws Exception
           {
               return new PoolKey();
           }
  -        
  +
           /**
            * Uninitialize an instance to be returned to the pool.
            * @param obj the instance to be passivated
            */
  -        public void passivateObject(Object obj) 
  +        public void passivateObject(Object obj)
               throws Exception
           {
               PoolKey key = (PoolKey)obj;
  
  
  
  1.9       +8 -8      jakarta-commons-sandbox/jdbc2pool/src/java/org/apache/commons/jdbc2pool/Jdbc2PoolDataSource.java
  
  Index: Jdbc2PoolDataSource.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jdbc2pool/src/java/org/apache/commons/jdbc2pool/Jdbc2PoolDataSource.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Jdbc2PoolDataSource.java	5 Jul 2002 08:23:04 -0000	1.8
  +++ Jdbc2PoolDataSource.java	16 Jul 2002 18:40:35 -0000	1.9
  @@ -82,7 +82,7 @@
   import javax.naming.spi.ObjectFactory;
   
   import org.apache.commons.collections.FastHashMap;
  -import org.apache.commons.lang.Serialization;
  +import org.apache.commons.lang.SerializationUtils;
   import org.apache.commons.pool.ObjectPool;
   import org.apache.commons.pool.impl.GenericObjectPool;
   import org.apache.commons.pool.KeyedObjectPool;
  @@ -1380,7 +1380,7 @@
                   {
                       byte[] serialized = (byte[])ra.getContent();
                       jndiEnvironment =
  -                        (Properties)Serialization.deserialize(serialized);
  +                        (Properties)SerializationUtils.deserialize(serialized);
                   }
   
                   ra = ref.get("loginTimeout");
  @@ -1395,7 +1395,7 @@
                   {
                       byte[] serialized = (byte[])ra.getContent();
                       perUserDefaultAutoCommit =
  -                        (Map)Serialization.deserialize(serialized);
  +                        (Map)SerializationUtils.deserialize(serialized);
                   }
   
                   ra = ref.get("perUserMaxActive");
  @@ -1403,7 +1403,7 @@
                   {
                       byte[] serialized = (byte[])ra.getContent();
                       perUserMaxActive =
  -                        (Map)Serialization.deserialize(serialized);
  +                        (Map)SerializationUtils.deserialize(serialized);
                   }
   
                   ra = ref.get("perUserMaxIdle");
  @@ -1411,7 +1411,7 @@
                   {
                       byte[] serialized = (byte[])ra.getContent();
                       perUserMaxIdle =
  -                        (Map)Serialization.deserialize(serialized);
  +                        (Map)SerializationUtils.deserialize(serialized);
                   }
   
                   ra = ref.get("perUserMaxWait");
  @@ -1419,7 +1419,7 @@
                   {
                       byte[] serialized = (byte[])ra.getContent();
                       perUserMaxWait =
  -                        (Map)Serialization.deserialize(serialized);
  +                        (Map)SerializationUtils.deserialize(serialized);
                   }
   
                   ra = ref.get("perUserDefaultReadOnly");
  @@ -1427,7 +1427,7 @@
                   {
                       byte[] serialized = (byte[])ra.getContent();
                       perUserDefaultReadOnly =
  -                        (Map)Serialization.deserialize(serialized);
  +                        (Map)SerializationUtils.deserialize(serialized);
                   }
   
                   ra = ref.get("testOnBorrow");
  
  
  
  1.2       +3 -3      jakarta-commons-sandbox/jdbc2pool/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jdbc2pool/project.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- project.xml	5 Jul 2002 08:18:35 -0000	1.1
  +++ project.xml	16 Jul 2002 18:40:36 -0000	1.2
  @@ -58,7 +58,7 @@
   
       <dependency>
         <id>commons-collections</id>
  -      <version>2.1-dev</version>
  +      <version>2.0</version>
         <url>http://jakarta.apache.org/commons/collections.html</url>
       </dependency>
       <dependency>
  @@ -68,12 +68,12 @@
       </dependency>
       <dependency>
         <id>commons-lang</id>
  -      <version>1.0-dev</version>
  +      <version>1.0-dev-20020716</version>
         <url>http://jakarta.apache.org/commons/</url>
       </dependency>
       <dependency>
         <id>commons-pool</id>
  -      <version>1.1-dev</version>
  +      <version>1.0</version>
         <url>http://jakarta.apache.org/commons/pool/</url>
       </dependency>
       <dependency>
  
  
  

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