As far as the source changes are concerned, then they look good to me.

-Chris.

On 02/04/2014 03:02 PM, Alan Bateman wrote:

The native methods for the JDK-specific API to JAAS don't handle handle
errors and JNI exceptions everywhere. I'd like to fix some of these with
the following patch:

http://cr.openjdk.java.net/~alanb/8031586/webrev/

A couple of things to note:

- The existing code throws IllegalArgumentException for cases where
GetFieldID fails. I've cleaned this up a bit but it might be simpler to
just get rid of this and let the NoSuchFieldError or other error be
thrown, any opinions? I should add that at least in
SolarisSystem.getSolarisInfo then the exception messages weren't
actually useful because they are all the same. I can only assume that
the original author wanted a useful exception thrown when the java and
native code is out of sync.

- In NTSystem.getCurrent it requires a lot of work to set systemError to
true when there is an error. I decided the simplest thing here is to
just removing the not-very-useful message printed to stdout.

- As the JAAS library is not linked to libjava then it means we can't
use the JNU_* functions defined in jni_util.c. We deliberately removed
this dependency some time ago as part of our modularity efforts.

-Alan

Reply via email to