Skip to content

Commit

Permalink
fix: corrected currency serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
novoj committed Oct 29, 2024
1 parent 3fb6ff2 commit 8bc9234
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
import com.esotericsoftware.kryo.io.Output;
import io.evitadb.dataType.ComparableCurrency;

import java.util.Currency;

/**
* Class handles Kryo (de)serialization of {@link ComparableCurrency} instances.
*
Expand All @@ -41,7 +43,7 @@ public void write(Kryo kryo, Output output, ComparableCurrency currency) {
}

public ComparableCurrency read(Kryo kryo, Input input, Class<? extends ComparableCurrency> type) {
return kryo.readObject(input, ComparableCurrency.class);
return new ComparableCurrency(kryo.readObject(input, Currency.class));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
*
* @author Jan Novotný ([email protected]), FG Forrest a.s. (c) 2019
*/
@SuppressWarnings("rawtypes")
public class ValueToRecordBitmapSerializer extends Serializer<ValueToRecordBitmap> {

public void write(Kryo kryo, Output output, ValueToRecordBitmap valueToRecordBitmap) {
Expand Down

0 comments on commit 8bc9234

Please sign in to comment.