mirror of
https://github.com/usatiuk/dhfs.git
synced 2025-10-28 20:47:49 +01:00
don't read wrong value in snapshot's readObject
This commit is contained in:
@@ -362,10 +362,10 @@ public class SnapshotManager {
|
||||
public Optional<JDataVersionedWrapper> readObject(JObjectKey name) {
|
||||
try (var it = getIterator(name)) {
|
||||
if (it.hasNext()) {
|
||||
var read = it.next();
|
||||
if (read.getKey().equals(name)) {
|
||||
return Optional.of(read.getValue());
|
||||
if (!it.peekNextKey().equals(name)) {
|
||||
return Optional.empty();
|
||||
}
|
||||
return Optional.of(it.next().getValue());
|
||||
}
|
||||
}
|
||||
return Optional.empty();
|
||||
|
||||
Reference in New Issue
Block a user