cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r439604 - /incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/types/SerializableTypeFactory.java
Date Sat, 02 Sep 2006 14:51:09 GMT
Author: aadamchik
Date: Sat Sep  2 07:51:08 2006
New Revision: 439604

URL: http://svn.apache.org/viewvc?rev=439604&view=rev
Log:
renamed private read/writeObject to look different from conventional serialization methods

Modified:
    incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/types/SerializableTypeFactory.java

Modified: incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/types/SerializableTypeFactory.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/types/SerializableTypeFactory.java?rev=439604&r1=439603&r2=439604&view=diff
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/types/SerializableTypeFactory.java
(original)
+++ incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/types/SerializableTypeFactory.java
Sat Sep  2 07:51:08 2006
@@ -91,13 +91,13 @@
                 throws Exception {
 
             byte[] bytes = (byte[]) bytesType.materializeObject(rs, index, type);
-            return readObject(bytes);
+            return readBytes(bytes);
         }
 
         public Object materializeObject(ResultSet rs, int index, int type)
                 throws Exception {
             byte[] bytes = (byte[]) bytesType.materializeObject(rs, index, type);
-            return readObject(bytes);
+            return readBytes(bytes);
         }
 
         public void setJdbcObject(
@@ -111,7 +111,7 @@
                 statement.setNull(pos, type);
             }
             else {
-                byte[] bytes = writeObject((Serializable) value);
+                byte[] bytes = writeBytes((Serializable) value);
                 bytesType.setJdbcObject(statement, bytes, pos, type, precision);
             }
         }
@@ -125,12 +125,12 @@
             return true;
         }
 
-        private Object readObject(byte[] bytes) throws Exception {
+        private Object readBytes(byte[] bytes) throws Exception {
             return bytes != null && bytes.length > 0 ? new ObjectInputStream(
                     new ByteArrayInputStream(bytes)).readObject() : null;
         }
 
-        private byte[] writeObject(Serializable object) throws Exception {
+        private byte[] writeBytes(Serializable object) throws Exception {
             ByteArrayOutputStream bytes = new ByteArrayOutputStream() {
 
                 // avoid unneeded array copy...



Mime
View raw message