@ Override public void process ( Step context ) { Iterator < Attachment > iterator = context . getAttachments ( ) . listIterator ( ) ; while ( iterator . hasNext ( ) ) { Attachment attachment = iterator . next ( ) ; if ( pattern . matcher ( attachment . getSource ( ) ) . matches ( ) ) { deleteAttachment ( attachment ) ; iterator . remove ( ) ; } } for ( Step step : context . getSteps ( ) ) { process ( step ) ; } }
Remove attachments matches pattern from step and all step substeps