private void cullDisabledPaths ( ) throws Exception { ArrayList < EndpointOverride > removePaths = new ArrayList < EndpointOverride > ( ) ; RequestInformation requestInfo = requestInformation . get ( ) ; for ( EndpointOverride selectedPath : requestInfo . selectedResponsePaths ) { // check repeat count on selectedPath // -1 is unlimited if ( selectedPath != null && selectedPath . getRepeatNumber ( ) == 0 ) { // skip removePaths . add ( selectedPath ) ; } else if ( selectedPath != null && selectedPath . getRepeatNumber ( ) != - 1 ) { // need to decrement the # selectedPath . updateRepeatNumber ( selectedPath . getRepeatNumber ( ) - 1 ) ; } } // remove paths if we need to for ( EndpointOverride removePath : removePaths ) { requestInfo . selectedResponsePaths . remove ( removePath ) ; } }
Remove paths with no active overrides