Ignore:
Timestamp:
2013-04-07T17:07:27+02:00 (13 years ago)
Author:
akks
Message:

JOSM/ImageryCache: updated MapDB (no more deadlocks, Java 1.6 compatible), less crashes, multiple-JOSM support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/imagerycache/src/org/mapdb/SerializerBase.java

    r29363 r29484  
    3434
    3535
    36     static final Set knownSerializable = new HashSet(Arrays.asList(
     36    static final class knownSerializable{
     37        static final Set get = new HashSet(Arrays.asList(
    3738            BTreeKeySerializer.STRING,
    3839            BTreeKeySerializer.ZERO_OR_POSITIVE_LONG,
    3940            BTreeKeySerializer.ZERO_OR_POSITIVE_INT,
    40 
    4141            Utils.COMPARABLE_COMPARATOR, Utils.COMPARABLE_COMPARATOR_WITH_NULLS,
    4242
     
    4444            Serializer.EMPTY_SERIALIZER, Serializer.BASIC_SERIALIZER, Serializer.CRC32_CHECKSUM
    4545    ));
     46    }
    4647
    4748    public static void assertSerializable(Object o){
    4849        if(o!=null && !(o instanceof Serializable)
    49                 && !knownSerializable.contains(o)){
     50                && !knownSerializable.get.contains(o)){
    5051            throw new IllegalArgumentException("Not serializable: "+o.getClass());
    5152        }
     
    5556     * Utility class similar to ArrayList, but with fast identity search.
    5657     */
    57     final static class FastArrayList<K> {
     58    protected final static class FastArrayList<K> {
    5859
    5960        private int size = 0;
     
    303304            if(((BTreeKeySerializer.BasicKeySerializer)obj).defaultSerializer!=this) throw new InternalError();
    304305            return;
    305         } else if(clazz == CompressLZF.SerializerCompressWrapper.class){
     306        } else if(clazz == CompressSerializerWrapper.class){
    306307            out.write(SERIALIZER_COMPRESSION_WRAPPER);
    307             serialize(out, ((CompressLZF.SerializerCompressWrapper)obj).serializer, objectStack);
     308            serialize(out, ((CompressSerializerWrapper)obj).serializer, objectStack);
    308309            return;
    309310
     
    11111112                break;
    11121113            case SERIALIZER_COMPRESSION_WRAPPER:
    1113                 ret = CompressLZF.serializerCompressWrapper((Serializer) deserialize(is, objectStack));
     1114                ret = CompressLZF.CompressionWrapper((Serializer) deserialize(is, objectStack));
    11141115                break;
    11151116            default:
Note: See TracChangeset for help on using the changeset viewer.