This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: strict jni checking


Tom Tromey wrote:

Mark> +  java::util::Properties *props = java::lang::System::properties;
Mark> +  if (props->get (JvNewStringLatin1 ("gnu.gcj.jni")))
Mark> +    _Jv_JNI_Init (true);
Mark> +  else
Mark> +    _Jv_JNI_Init (false);

Do we want to enforce some specific value of the property here?

I think perhaps the property should be named "gnu.gcj.jni.strict" or
something like that.  Just "jni" is too plain.

Also, please document the property in gcc/java/gcj.texi.


This is looking good. I'm sure the Sable guys will be happy once we
are all writing error-free JNI all the time :-)


Yes, this is a nice patch. However, I do wonder if its worth having the system property to enable it at all. Developers arn't often going to seek out obscure options in order to get better checks, so how useful it is to have them if they arn't enabled all the time? The value of having these checks would be far greater if they are enabled all the time.

If the overhead of the checking is really significant, then we'd have to make some compromises - but is there anything thats expensive enough to be likely to have a significant effect on the overall performance of most JNI applications?

Bryce


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]