question: private void updateCachedData ( ) { int rangeStart = range . getStart ( ) ; int expectedLastIndex = Math . max ( 0 , Math . min ( range . getLength ( ) , getRowCount ( ) - rangeStart ) ) ; int lastIndex = getVisibleItemCount ( ) - 1 ; while ( lastIndex >= expectedLastIndex ) { rows . remove ( lastIndex ) ; lastIndex -- ; } }
target:  Ensure that the cached data is consistent with the data size.