public synchronized Entry next ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "next" ) ; // can only do anything if the cursor is still pointing in to a list checkEntryParent ( ) ; Entry nextEntry = null ; synchronized ( parentList ) { //get the next entry in the list nextEntry = getNextEntry ( ) ; //if the next entry is null if ( nextEntry == null ) { //then hopefully we're at the end of the list if ( current == parentList . last ) { //so move the cursor to the bottom of the list, //not pointing to any actual entry moveToBottom ( ) ; } else if ( ! atBottom ) { //it should not be possible for the next entry to be null but the current //not be the last one in the list or already at the bottom SIErrorException e = new SIErrorException ( nls . getFormattedMessage ( "INTERNAL_MESSAGING_ERROR_CWSIP0001" , new Object [ ] { "Cursor" , "1:160:1.15" } , null ) ) ; FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.utils.linkedlist.Cursor.next" , "1:166:1.15" , this ) ; SibTr . exception ( tc , e ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "next" , e ) ; throw e ; } } else { //move the cursor to the next entry moveCursor ( nextEntry ) ; } } if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "next" , nextEntry ) ; return nextEntry ; }
Synchronized . Move the cursor down to the next entry in the list and return it .