cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1547890 - /cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/types/CharType.java
Date Wed, 04 Dec 2013 20:04:21 GMT
Author: aadamchik
Date: Wed Dec  4 20:04:21 2013
New Revision: 1547890

URL: http://svn.apache.org/r1547890
Log:
CAY-1890 Remove Cayenne-level buffering when retrieving LOBs

Modified:
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/types/CharType.java

Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/types/CharType.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/types/CharType.java?rev=1547890&r1=1547889&r2=1547890&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/types/CharType.java
(original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/types/CharType.java
Wed Dec  4 20:04:21 2013
@@ -19,7 +19,6 @@
 
 package org.apache.cayenne.access.types;
 
-import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.Reader;
 import java.io.StringWriter;
@@ -153,13 +152,7 @@ public class CharType implements Extende
             return "";
         }
 
-        int bufSize = (size < BUF_SIZE) ? size : BUF_SIZE;
-
-        Reader in = clob.getCharacterStream();
-        return (in != null) ? readValueStream(
-                new BufferedReader(in, bufSize),
-                size,
-                bufSize) : null;
+        return clob.getSubString(1, size);
     }
 
     protected String readCharStream(ResultSet rs, int index) throws IOException,



Mime
View raw message