We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8dbc485 commit 9459e83Copy full SHA for 9459e83
1 file changed
persistence/binary/src/main/java/org/eclipse/serializer/persistence/binary/types/Binary.java
@@ -2096,9 +2096,10 @@ private static void validatePostIterationState(
2096
// (19.03.2019 TM)NOTE: added "|| iterator.hasNext()" check
2097
if(address != elementsBinaryBound || iterator.hasNext())
2098
{
2099
+ final long iteratedCount = elementCount - (elementsBinaryBound - address) / entryLength;
2100
throw new BinaryPersistenceException(
2101
"Inconsistent element count: specified " + elementCount
- + " vs. iterated " + (elementCount - (elementsBinaryBound - address) / entryLength)
2102
+ + " vs. iterated " + (iterator.hasNext() ? "more than " + iteratedCount : iteratedCount)
2103
);
2104
}
2105
0 commit comments