ReflectionHelpers: Re-throw unchecked exceptions when invoking reflectively

Brought consistency to the handling of unchecked exceptions/errors across all of the reflective execution helpers (instance, static & constructor). All will now rethrow any unchecked exceptions and wrap checked exceptions in a `RuntimeException`. (Previously only instance methods did this and only for `RuntimeException`s, not `Error`s).

Also took the opportunity to get rid of the raw types in ReflectionHelpers.
I personally never specify scope in depMgmt and only in the actual
dependency. If that already exists, fine.

On Thu, Dec 11, 2014, 6:32 PM Fr Jeremy Krieg <notifications@github.com>
wrote:

> In robolectric-utils/pom.xml
> <https://github.com/robolectric/robolectric/pull/1421#discussion-diff-21725804>
> :
>
> > @@ -18,6 +18,11 @@
> >        <scope>provided</scope>
> >      </dependency>
> >
> > +    <dependency>
> > +      <groupId>org.assertj</groupId>
> > +      <artifactId>assertj-core</artifactId>
>
> Per Erich's reasoning, I didn't see a problem with adding assertj because
> it's already used in most other modules. Anyone building Robolectric will
> already have it in their local repository.
>
> I decided to use AssertJ for a couple of my tests primarily because there
> is no easy equivalent (that I am aware of) to isInstanceOf() in standard
> JUnit assertions. You can use assertTrue(x instanceof Y), but the
> resulting diagnostics are poor unless you hand-craft them (which is
> tedious). I didn't convert the other tests because I was being lazy
> efficient. I figured having some with the improved diagnostics is better
> than having none. Anyway, it only took me 15m to go through and update all
> the tests to use AssertJ so I've done that now & pushed a new commit.
>
> As for the test scope: unless overridden, scope is inherited from the
> <dependencyManagement> section of the parent POM, where it is correctly
> specified as test. You can verify that this is filtering through by
> running mvn dependency:list -pl robolectric-utils If you'd rather have
> the scope listed explicitly (even though that is redundant) to avoid
> confusion, I'm happy to make that change.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/robolectric/robolectric/pull/1421/files#r21725804>.
>