Commits

Arthur Blake  committed 29529bf

bug fix ResultSetSpy.getStatement should return wrapped Statement, not real Statement (Issue 55)

  • Participants
  • Parent commits 91775cf

Comments (0)

Files changed (3)

+TBD				1.2.1 release
+
+           o bug fix ResultSetSpy.getStatement should return wrapped Statement,
+             not real Statement (Issue 55)
+
 2012-02-17 1.2 Release
 
            o escape single quotes in PreparedStatement/CallableStatement bind variables (Issue 36.)

File src-jdbc3/net/sf/log4jdbc/ResultSetSpy.java

   public Statement getStatement() throws SQLException
   {
     String methodCall = "getStatement()";
-    try
-    {
-      return (Statement) reportReturn(methodCall, realResultSet.getStatement());
-    }
-    catch (SQLException s)
-    {
-      reportException(methodCall, s);
-      throw s;
-    }
+    return (Statement) reportReturn(methodCall, parent);
   }
 
   public void updateString(int columnIndex, String x) throws SQLException

File src-jdbc4/net/sf/log4jdbc/ResultSetSpy.java

   public Statement getStatement() throws SQLException
   {
     String methodCall = "getStatement()";
-    try
-    {
-      return (Statement) reportReturn(methodCall, realResultSet.getStatement());
-    }
-    catch (SQLException s)
-    {
-      reportException(methodCall, s);
-      throw s;
-    }
+    return (Statement) reportReturn(methodCall, parent);
   }
 
   public Object getObject(int columnIndex, Map<String, Class<?>> map) throws SQLException