Bugfix
This commit is contained in:
parent
23d5f700fb
commit
f30ad372ed
@ -41,18 +41,16 @@ public class DatabaseLong implements LLKeyValueDatabaseStructure {
|
||||
try (var prevBuf = prev.receive()) {
|
||||
var prevLong = prevBuf.readLong();
|
||||
var alloc = singleton.getAllocator();
|
||||
try (var buf = alloc.allocate(Long.BYTES)) {
|
||||
var buf = alloc.allocate(Long.BYTES);
|
||||
buf.writeLong(prevLong + 1);
|
||||
return buf;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
var alloc = singleton.getAllocator();
|
||||
try (var buf = alloc.allocate(Long.BYTES)) {
|
||||
var buf = alloc.allocate(Long.BYTES);
|
||||
buf.writeLong(1);
|
||||
return buf;
|
||||
}
|
||||
}
|
||||
}, updateReturnMode).map(send -> {
|
||||
try (var buf = send.receive()) {
|
||||
return buf.readLong();
|
||||
|
Loading…
Reference in New Issue
Block a user