(List<Integer> resultCollector)
| 41 | implements Processor<Integer, Failure2> { |
| 42 | static int count = 2; |
| 43 | @Override |
| 44 | public void process(List<Integer> resultCollector) |
| 45 | throws Failure2 { |
| 46 | if(count-- == 0) |
| 47 | resultCollector.add(47); |
| 48 | else { |
| 49 | resultCollector.add(11); |
| 50 | } |
| 51 | if(count < 0) |
| 52 | throw new Failure2(); |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | public class ThrowGenericException { |