Author: markt Date: Fri Jul 26 08:53:52 2013 New Revision: 1507221 URL: http://svn.apache.org/r1507221 Log: Add a simple toString() implementation to aid debugging in an IDE and to test viewing this class as an object in a pool via JMX.
Modified: commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterPreparedStatement.java Modified: commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterPreparedStatement.java URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterPreparedStatement.java?rev=1507221&r1=1507220&r2=1507221&view=diff ============================================================================== --- commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterPreparedStatement.java (original) +++ commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterPreparedStatement.java Fri Jul 26 08:53:52 2013 @@ -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. @@ -38,7 +38,7 @@ import java.sql.SQLXML; /** * A dummy {@link PreparedStatement}, for testing purposes. - * + * * @author Rodney Waldhoff * @author Dirk Verbeeck * @version $Revision$ $Date$ @@ -70,7 +70,7 @@ public class TesterPreparedStatement ext _catalog = conn.getCatalog(); } catch (SQLException e) { } } - + /** for junit test only */ public String getCatalog() { return _catalog; @@ -431,4 +431,9 @@ public class TesterPreparedStatement ext throw new SQLException("Not implemented."); } /* JDBC_4_ANT_KEY_END */ + + @Override + public String toString() { + return this.getClass().getName() + " [" + _sql + "]"; + } }