openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwsut...@apache.org
Subject svn commit: r1291918 - /openjpa/branches/2.2.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/LoggingConnectionDecorator.java
Date Tue, 21 Feb 2012 17:04:43 GMT
Author: kwsutter
Date: Tue Feb 21 17:04:43 2012
New Revision: 1291918

URL: http://svn.apache.org/viewvc?rev=1291918&view=rev
Log:
OPENJPA-2123.  Only format parameters for printing if logging is turned on.

Modified:
    openjpa/branches/2.2.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/LoggingConnectionDecorator.java

Modified: openjpa/branches/2.2.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/LoggingConnectionDecorator.java
URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/LoggingConnectionDecorator.java?rev=1291918&r1=1291917&r2=1291918&view=diff
==============================================================================
--- openjpa/branches/2.2.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/LoggingConnectionDecorator.java
(original)
+++ openjpa/branches/2.2.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/LoggingConnectionDecorator.java
Tue Feb 21 17:04:43 2012
@@ -20,10 +20,8 @@ package org.apache.openjpa.lib.jdbc;
 
 import java.io.InputStream;
 import java.io.Reader;
-import java.lang.reflect.Constructor;
 import java.math.BigDecimal;
 import java.net.URL;
-import java.security.AccessController;
 import java.sql.Array;
 import java.sql.BatchUpdateException;
 import java.sql.Blob;
@@ -48,18 +46,7 @@ import java.util.Calendar;
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.LoggingConnection.
-        LoggingCallableStatement;
-import org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.LoggingConnection.
-        LoggingDatabaseMetaData;
-import org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.LoggingConnection.
-        LoggingPreparedStatement;
-import org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.LoggingConnection.
-        LoggingResultSet;
-import org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.LoggingConnection.
-        LoggingStatement;
 import org.apache.openjpa.lib.log.Log;
-import org.apache.openjpa.lib.util.ConcreteClassGenerator;
 import org.apache.openjpa.lib.util.J2DoPrivHelper;
 
 /**
@@ -98,7 +85,6 @@ public class LoggingConnectionDecorator 
     private int _prettyPrintLineLength = 60;
     private int _warningAction = WARN_IGNORE;
     private SQLWarningHandler _warningHandler;
-    private boolean _trackParameters = true;
     private boolean _printParameters = false;
 
     /**
@@ -144,20 +130,6 @@ public class LoggingConnectionDecorator 
     }
 
     /**
-     * <p>Whether to track parameters for the purpose of reporting exceptions.</p>
-     */
-    public void setTrackParameters(boolean trackParameters) {
-        _trackParameters = trackParameters;
-    }
-
-    /**
-     * Whether to track parameters for the purpose of reporting exceptions.
-     */
-    public boolean getTrackParameters() {
-        return _trackParameters;
-    }
-
-    /**
      * <p>
      * Whether parameter values will be printed in exception messages or in trace. This is
different from
      * trackParameters which controls whether OpenJPA will track parameters internally (visible
while debugging and used
@@ -1608,7 +1580,7 @@ public class LoggingConnectionDecorator 
             }
 
             private boolean shouldTrackParameters() {
-                return _trackParameters || _logs.isSQLEnabled();
+                return _printParameters || _logs.isSQLEnabled();
             }
 
             private void setLogParameter(int index, boolean val) {
@@ -2324,7 +2296,7 @@ public class LoggingConnectionDecorator 
             }
 
             private boolean shouldTrackParameters() {
-                return _trackParameters || _logs.isSQLEnabled();
+                return _printParameters || _logs.isSQLEnabled();
             }
 
             private void setLogParameter(int index, boolean val) {



Mime
View raw message