public static boolean hasSuppressed(@Nullable Throwable t,@Nullable Class<? extends Throwable> cls){
  if (t == null || cls == null)   return false;
  if (t.getSuppressed() != null) {
    for (    Throwable th : t.getSuppressed()) {
      if (cls.isAssignableFrom(th.getClass()))       return true;
      if (hasSuppressed(th,cls))       return true;
    }
  }
  return false;
}

public static boolean hasSuppressed ( @ Nullable Throwable t , @ Nullable Class < ? extends Throwable > cls ) { if ( t == null || cls == null ) return false ; if ( t . getSuppressed ( ) != null ) { for ( Throwable th : t . getSuppressed ( ) ) { if ( cls . isAssignableFrom ( th . getClass ( ) ) ) return true ; if ( hasSuppressed ( th , cls ) ) return true ; } } return false ; }
checks if passed throwable has given class in one of the suppressed exceptions .
