Changeset 29484 in osm for applications/editors/josm/plugins/imagerycache/src/org/mapdb/SerializerBase.java
- Timestamp:
- 2013-04-07T17:07:27+02:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/imagerycache/src/org/mapdb/SerializerBase.java
r29363 r29484 34 34 35 35 36 static final Set knownSerializable = new HashSet(Arrays.asList( 36 static final class knownSerializable{ 37 static final Set get = new HashSet(Arrays.asList( 37 38 BTreeKeySerializer.STRING, 38 39 BTreeKeySerializer.ZERO_OR_POSITIVE_LONG, 39 40 BTreeKeySerializer.ZERO_OR_POSITIVE_INT, 40 41 41 Utils.COMPARABLE_COMPARATOR, Utils.COMPARABLE_COMPARATOR_WITH_NULLS, 42 42 … … 44 44 Serializer.EMPTY_SERIALIZER, Serializer.BASIC_SERIALIZER, Serializer.CRC32_CHECKSUM 45 45 )); 46 } 46 47 47 48 public static void assertSerializable(Object o){ 48 49 if(o!=null && !(o instanceof Serializable) 49 && !knownSerializable.contains(o)){ 50 && !knownSerializable.get.contains(o)){ 50 51 throw new IllegalArgumentException("Not serializable: "+o.getClass()); 51 52 } … … 55 56 * Utility class similar to ArrayList, but with fast identity search. 56 57 */ 57 final static class FastArrayList<K> { 58 protected final static class FastArrayList<K> { 58 59 59 60 private int size = 0; … … 303 304 if(((BTreeKeySerializer.BasicKeySerializer)obj).defaultSerializer!=this) throw new InternalError(); 304 305 return; 305 } else if(clazz == Compress LZF.SerializerCompressWrapper.class){306 } else if(clazz == CompressSerializerWrapper.class){ 306 307 out.write(SERIALIZER_COMPRESSION_WRAPPER); 307 serialize(out, ((Compress LZF.SerializerCompressWrapper)obj).serializer, objectStack);308 serialize(out, ((CompressSerializerWrapper)obj).serializer, objectStack); 308 309 return; 309 310 … … 1111 1112 break; 1112 1113 case SERIALIZER_COMPRESSION_WRAPPER: 1113 ret = CompressLZF. serializerCompressWrapper((Serializer) deserialize(is, objectStack));1114 ret = CompressLZF.CompressionWrapper((Serializer) deserialize(is, objectStack)); 1114 1115 break; 1115 1116 default:
Note:
See TracChangeset
for help on using the changeset viewer.
