jankotek / mapdb

MapDB provides concurrent Maps, Sets and Queues backed by disk storage or off-heap-memory. It is a fast and easy to use embedded Java database engine.
https://mapdb.org
Apache License 2.0
4.87k stars 872 forks source link

Updating from 2.X to 3.X breaks due to change of Serializer #967

Open SElab2019 opened 4 years ago

SElab2019 commented 4 years ago

When I try to upgrade mapdb from 2.X to 3.X. The following code breaks.

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import java.io.Serializable;

import org.mapdb.Serializer;

public class TestMapdb extends Serializer<String> implements Serializable{

    /**
     * 
     */
    private static final long serialVersionUID = 1L;

    public void serialize(DataOutput out) throws IOException {
        // TODO Auto-generated method stub

    }

    @Override
    public String deserialize(DataInput in, int available) throws IOException {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public void serialize(DataOutput out, String value) throws IOException {
        // TODO Auto-generated method stub

    }

}

The code should pass, but it throws an error:

TestMapdb.java:[10,42] no interface expected here