git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@582574 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2007-10-07 04:42:24 +00:00
parent e2ef8b8165
commit 84a116d2c7
1 changed files with 4 additions and 1 deletions

View File

@ -258,12 +258,15 @@ public class DiskIndexLinkedList implements IndexLinkedList {
*/
public synchronized IndexItem getNextEntry(IndexItem current) {
IndexItem result = null;
if (current != null && current.getNextItem() >= 0) {
if (current != null ) {
current = (IndexItem) refreshEntry(current);
if(current.getNextItem() >= 0){
try {
result = indexManager.getIndex(current.getNextItem());
} catch (IOException e) {
throw new RuntimeException("Failed to get next index from " + indexManager + " for " + current, e);
}
}
}
// essential last get's updated consistently
if (result != null && last != null && last.equals(result)) {