Skip to content

Commit

Permalink
IDE complained about missing Double conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
JaroslavTulach committed Nov 13, 2023
1 parent 3ed31ac commit da5ecdc
Showing 1 changed file with 37 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,42 @@ protected String readObject(Input in) throws IOException, ClassNotFoundException
}
}

@ServiceProvider(service = Persistance.class)
public static final class PersistLong extends Persistance<Long> {
public PersistLong() {
super(Long.class, true, 4438);
}

@Override
protected void writeObject(Long obj, Output out) throws IOException {
out.writeLong(obj);
}

@Override
protected Long readObject(Input in) throws IOException, ClassNotFoundException {
var obj = in.readLong();
return obj;
}
}

@ServiceProvider(service = Persistance.class)
public static final class PersistDouble extends Persistance<Double> {
public PersistDouble() {
super(Double.class, true, 4439);
}

@Override
protected void writeObject(Double obj, Output out) throws IOException {
out.writeDouble(obj);
}

@Override
protected Double readObject(Input in) throws IOException, ClassNotFoundException {
var obj = in.readDouble();
return obj;
}
}

@ServiceProvider(service = Persistance.class)
public static final class PersistScalaList extends Persistance<List> {
public PersistScalaList() {
Expand Down Expand Up @@ -263,7 +299,7 @@ protected scala.collection.immutable.Set readObject(Input in)
@ServiceProvider(service = Persistance.class)
public static final class PersistMap extends Persistance<HashMap> {
public PersistMap() {
super(HashMap.class, true, 4439);
super(HashMap.class, true, 4440);
}

@Override
Expand Down

0 comments on commit da5ecdc

Please sign in to comment.