/*******************************************************************************
- * Copyright (c) 2013, 2014 Ericsson
+ * Copyright (c) 2013, 2016 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
ITmfCheckpoint checkpoint = null;
try {
long pos = getHeader().getSize() + fCheckpointSize * rank;
+ if (getRandomAccessFile() == null) {
+ return null;
+ }
getRandomAccessFile().seek(pos);
fByteBuffer.clear();
getRandomAccessFile().read(fByteBuffer.array());
ITmfLocation location = getTrace().restoreLocation(fByteBuffer);
- ITmfTimestamp timeStamp = new TmfTimestamp(fByteBuffer);
+ ITmfTimestamp timeStamp = TmfTimestamp.create(fByteBuffer);
checkpoint = new TmfCheckpoint(timeStamp, location, fByteBuffer);
} catch (IOException e) {
Activator.logError(MessageFormat.format(Messages.FlatArray_IOErrorReading, getFile()), e);
lower = middle + 1;
}
}
- long insertionPoint = lower;
- return -(insertionPoint) - 1;
+ return -(lower) - 1;
}
}