openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From curti...@apache.org
Subject svn commit: r888433 - in /openjpa/branches/1.2.x: ./ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLBuffer.java
Date Tue, 08 Dec 2009 15:15:37 GMT
Author: curtisr7
Date: Tue Dec  8 15:15:37 2009
New Revision: 888433

URL: http://svn.apache.org/viewvc?rev=888433&view=rev
Log:
OPENJPA-1171: Replace StringBuffer with StringBuilder in SQLBuffer to reduce synchronization.
Original change by Mike Dick.

Modified:
    openjpa/branches/1.2.x/   (props changed)
    openjpa/branches/1.2.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLBuffer.java

Propchange: openjpa/branches/1.2.x/
            ('svn:mergeinfo' removed)

Modified: openjpa/branches/1.2.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLBuffer.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.2.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLBuffer.java?rev=888433&r1=888432&r2=888433&view=diff
==============================================================================
--- openjpa/branches/1.2.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLBuffer.java
(original)
+++ openjpa/branches/1.2.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLBuffer.java
Tue Dec  8 15:15:37 2009
@@ -52,7 +52,7 @@
     private static final String PARAMETER_TOKEN = "?";
 
     private final DBDictionary _dict;
-    private final StringBuffer _sql = new StringBuffer();
+    private final StringBuilder _sql = new StringBuilder();
     private List _subsels = null;
     private List _params = null;
     private List _cols = null;
@@ -407,7 +407,7 @@
         if (!replaceParams || _params == null || _params.isEmpty())
             return sql;
 
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         Iterator pi = _params.iterator();
         for (int i = 0; i < sql.length(); i++) {
             if (sql.charAt(i) != '?') {



Mime
View raw message