More JNI exception-throwing cleanup.
There are a few (unimportant) bug fixes here. There were several attempts to
throw exceptions in situations where there's already a pending exception.
There were also cases where the code was wrong; it was checking for a NULL
return from Get*ArrayElements and throwing NPE, but passing NULL is an error
that causes a crash and a NULL return means an exception has already been
thrown. I didn't want to get into the Scoped* classes just yet, but that
was by far the easiest way to fix this.
Change-Id: I0b31160ee51b96e82539f6514b8412b149dba7c3
16 files changed