replaced ReflectiveOperationException (java 7 only)