Replaced ReflectiveOperationException as it requires jdk1.7+