@Test public void containsInterruptedException() { Throwable t1 = new IOException(new RuntimeException(new InterruptedException())); Throwable t2 = new IOException(new InterruptedIOException()); Throwable t3 = new InterruptedException(); Throwable t4 = new IOException(new RuntimeException(new IOException())); assertTrue(ExceptionUtils.containsInterruptedException(t1)); assertTrue(ExceptionUtils.containsInterruptedException(t2)); assertTrue(ExceptionUtils.containsInterruptedException(t3)); assertFalse(ExceptionUtils.containsInterruptedException(t4)); }
public static boolean containsInterruptedException(Throwable t) { return !Iterables .isEmpty(Iterables.filter(Throwables.getCausalChain(t), x -> isInterrupted(x))); }
ExceptionUtils { public static boolean containsInterruptedException(Throwable t) { return !Iterables .isEmpty(Iterables.filter(Throwables.getCausalChain(t), x -> isInterrupted(x))); } }
ExceptionUtils { public static boolean containsInterruptedException(Throwable t) { return !Iterables .isEmpty(Iterables.filter(Throwables.getCausalChain(t), x -> isInterrupted(x))); } private  ExceptionUtils(); }
ExceptionUtils { public static boolean containsInterruptedException(Throwable t) { return !Iterables .isEmpty(Iterables.filter(Throwables.getCausalChain(t), x -> isInterrupted(x))); } private  ExceptionUtils(); static boolean containsInterruptedException(Throwable t); static boolean isInterrupted(Throwable t); }
ExceptionUtils { public static boolean containsInterruptedException(Throwable t) { return !Iterables .isEmpty(Iterables.filter(Throwables.getCausalChain(t), x -> isInterrupted(x))); } private  ExceptionUtils(); static boolean containsInterruptedException(Throwable t); static boolean isInterrupted(Throwable t);  }