Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Register some additional serializers to allow full round-trip
- Loading branch information
Showing
3 changed files
with
63 additions
and
3 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
src/main/java/org/opentripplanner/kryo/HashBiMapSerializer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package org.opentripplanner.kryo; | ||
|
||
import com.esotericsoftware.kryo.Kryo; | ||
import com.esotericsoftware.kryo.io.Input; | ||
import com.esotericsoftware.kryo.serializers.MapSerializer; | ||
import com.google.common.collect.HashBiMap; | ||
|
||
import java.util.Map; | ||
|
||
/** | ||
* Created by abyrd on 2018-10-25 | ||
*/ | ||
public class HashBiMapSerializer extends MapSerializer { | ||
|
||
protected Map create(Kryo kryo, Input input, Class<Map> type) { | ||
return HashBiMap.create(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters