Author: tv Date: Fri Nov 20 13:29:15 2015 New Revision: 1715355 URL: http://svn.apache.org/viewvc?rev=1715355&view=rev Log: JCS-149: When reading keys from disk, a StreamCorruptedException happens when a custom serializer is applied
Modified: commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/disk/block/BlockDiskCacheFactory.java commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/disk/indexed/IndexedDiskCacheFactory.java commons/proper/jcs/trunk/src/changes/changes.xml Modified: commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/disk/block/BlockDiskCacheFactory.java URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/disk/block/BlockDiskCacheFactory.java?rev=1715355&r1=1715354&r2=1715355&view=diff ============================================================================== --- commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/disk/block/BlockDiskCacheFactory.java (original) +++ commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/disk/block/BlockDiskCacheFactory.java Fri Nov 20 13:29:15 2015 @@ -57,9 +57,8 @@ public class BlockDiskCacheFactory log.debug( "Creating DiskCache for attributes = " + idca ); } - BlockDiskCache<K, V> cache = new BlockDiskCache<K, V>( idca ); + BlockDiskCache<K, V> cache = new BlockDiskCache<K, V>( idca, elementSerializer ); cache.setCacheEventLogger( cacheEventLogger ); - cache.setElementSerializer( elementSerializer ); return cache; } Modified: commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/disk/indexed/IndexedDiskCacheFactory.java URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/disk/indexed/IndexedDiskCacheFactory.java?rev=1715355&r1=1715354&r2=1715355&view=diff ============================================================================== --- commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/disk/indexed/IndexedDiskCacheFactory.java (original) +++ commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/disk/indexed/IndexedDiskCacheFactory.java Fri Nov 20 13:29:15 2015 @@ -57,9 +57,8 @@ public class IndexedDiskCacheFactory log.debug( "Creating DiskCache for attributes = " + idca ); } - IndexedDiskCache<K, V> cache = new IndexedDiskCache<K, V>( idca ); + IndexedDiskCache<K, V> cache = new IndexedDiskCache<K, V>( idca, elementSerializer ); cache.setCacheEventLogger( cacheEventLogger ); - cache.setElementSerializer(elementSerializer); return cache; } Modified: commons/proper/jcs/trunk/src/changes/changes.xml URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/changes/changes.xml?rev=1715355&r1=1715354&r2=1715355&view=diff ============================================================================== --- commons/proper/jcs/trunk/src/changes/changes.xml (original) +++ commons/proper/jcs/trunk/src/changes/changes.xml Fri Nov 20 13:29:15 2015 @@ -20,6 +20,9 @@ </properties> <body> <release version="2.0" date="unreleased" description="JDK 1.6 based major release"> + <action issue="JCS-149" dev="tv" type="fix" due-to="Youngho Cho"> + When reading keys from disk, a StreamCorruptedException happens when a custom serializer is applied + </action> <action issue="JCS-48" dev="tv" type="update" due-to="Hanasaki Jiji"> Replace PoolAccess with a DataSourceFactory model borrowed from DB-Torque </action>