@SuppressWarnings("unchecked") private static <T extends Throwable>RuntimeException throwUnchecked(Throwable t) throws T {
  throw (T)t;
}

@ SuppressWarnings ( "unchecked" ) private static < T extends Throwable > RuntimeException throwUnchecked ( Throwable t ) throws T { throw ( T ) t ; }
a dirty trick to throw a checked exception like if it was unchecked .
