} catch (AssertionError error) {
// ASSERTX
final long recordPositionInFile = heapRecord
.getPositionInFile();
if (recordPositionInFile != entry.getKey()) {
throw new HeapException(// NOPMD
"integrity error record position is "
+ recordPositionInFile
+ " and map key is " + entry.getKey());
}
if (recordPositionInFile <= lastWrotePositionInFile) {
throw new HeapException("last wrote position is "// NOPMD
+ lastWrotePositionInFile
+ " and record position in file is "
+ recordPositionInFile
+ " for \n"
+ heapRecord.toString());
}
final long previousRecordPositionInFile = heapRecord
.getPreviousRecordPositionInFile();
if (previousRecordPositionInFile == -1) {
if (recordPositionInFile != header.getRecordSize()) {
throw new HeapException(
"bad position of first record "// NOPMD
+ recordPositionInFile
+ " for "
+ header.getRecordSize()
+ " expected");