Author: markt
Date: Sun Jan 12 17:49:30 2014
New Revision: 1557569

URL: http://svn.apache.org/r1557569
Log:
DBCP-317.
Partial fix. Remove unnecessary equals() methods.

Modified:
    
commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/java/org/apache/commons/dbcp/DelegatingCallableStatement.java
    
commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/java/org/apache/commons/dbcp/DelegatingPreparedStatement.java

Modified: 
commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/java/org/apache/commons/dbcp/DelegatingCallableStatement.java
URL: 
http://svn.apache.org/viewvc/commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/java/org/apache/commons/dbcp/DelegatingCallableStatement.java?rev=1557569&r1=1557568&r2=1557569&view=diff
==============================================================================
--- 
commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/java/org/apache/commons/dbcp/DelegatingCallableStatement.java
 (original)
+++ 
commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/java/org/apache/commons/dbcp/DelegatingCallableStatement.java
 Sun Jan 12 17:49:30 2014
@@ -71,21 +71,6 @@ public class DelegatingCallableStatement
         super(c, s);
     }
 
-    public boolean equals(Object obj) {
-       if (this == obj) return true;
-        CallableStatement delegate = (CallableStatement) 
getInnermostDelegate();
-        if (delegate == null) {
-            return false;
-        }
-        if (obj instanceof DelegatingCallableStatement) {
-            DelegatingCallableStatement s = (DelegatingCallableStatement) obj;
-            return delegate.equals(s.getInnermostDelegate());
-        }
-        else {
-            return delegate.equals(obj);
-        }
-    }
-
     /** Sets my delegate. */
     public void setDelegate(CallableStatement s) {
         super.setDelegate(s);

Modified: 
commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/java/org/apache/commons/dbcp/DelegatingPreparedStatement.java
URL: 
http://svn.apache.org/viewvc/commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/java/org/apache/commons/dbcp/DelegatingPreparedStatement.java?rev=1557569&r1=1557568&r2=1557569&view=diff
==============================================================================
--- 
commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/java/org/apache/commons/dbcp/DelegatingPreparedStatement.java
 (original)
+++ 
commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH/src/java/org/apache/commons/dbcp/DelegatingPreparedStatement.java
 Sun Jan 12 17:49:30 2014
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -44,7 +44,7 @@ import java.sql.SQLXML;
  * provided in my constructor.
  * <p>
  * Extends AbandonedTrace to implement Statement tracking and
- * logging of code which created the Statement. Tracking the 
+ * logging of code which created the Statement. Tracking the
  * Statement ensures that the Connection which created it can
  * close any open Statement's on Connection close.
  *
@@ -70,21 +70,6 @@ public class DelegatingPreparedStatement
         super(c, s);
     }
 
-    public boolean equals(Object obj) {
-       if (this == obj) return true;
-        PreparedStatement delegate = (PreparedStatement) 
getInnermostDelegate();
-        if (delegate == null) {
-            return false;
-        }
-        if (obj instanceof DelegatingPreparedStatement) {
-            DelegatingPreparedStatement s = (DelegatingPreparedStatement) obj;
-            return delegate.equals(s.getInnermostDelegate());
-        }
-        else {
-            return delegate.equals(obj);
-        }
-    }
-
     /** Sets my delegate. */
     public void setDelegate(PreparedStatement s) {
         super.setDelegate(s);
@@ -166,7 +151,7 @@ public class DelegatingPreparedStatement
     /** @deprecated */
     public void setUnicodeStream(int parameterIndex, java.io.InputStream x, 
int length) throws SQLException
     { checkOpen(); try { 
((PreparedStatement)_stmt).setUnicodeStream(parameterIndex,x,length); } catch 
(SQLException e) { handleException(e); } }
-    
+
     public void setBinaryStream(int parameterIndex, java.io.InputStream x, int 
length) throws SQLException
     { checkOpen(); try { 
((PreparedStatement)_stmt).setBinaryStream(parameterIndex,x,length); } catch 
(SQLException e) { handleException(e); } }
 
@@ -231,7 +216,7 @@ public class DelegatingPreparedStatement
     /**
      * Returns a String representation of this object.
      *
-     * @return String 
+     * @return String
      * @since 1.2.2
      */
     public String toString() {


Reply via email to