RFR JDK-8079466: JNI Specification Update and Clean-up

David Simms david.simms at oracle.com
Fri May 22 08:30:21 UTC 2015


Thanks Harold, that was quick work !

Updated web review: http://cr.openjdk.java.net/~dsimms/8079466/rev1/

Adjusted as per your comments:

On 20/05/15 21:38, harold seigel wrote:
> Hi David,
>
> It looks like a lot of work!  I have just a few small comments:
>
> 1. In functions.html, delete the 'a' before 'this'
>
>  944 reference. May be a <code>NULL</code> value, in which case a this 
> function will
>  945 return <code>NULL</code>.</p>
>
Done
>
> 2. In function.html, perhaps some commas around 'for example' ?
>
> 1035 (e.g. <code>JNI_ERR</code> or <code>JNI_EINVAL</code>). The 
> HotSpot JVM
> 1036 implementation for example uses the 
> <code>-XX:+MaxJNILocalCapacity</code> flag
> 1037 (default: 65536).</p>
>
Done
>
> 3. In function.html, should the words "string length" be added to line 
> 4339, like they are in line 4335?
>
> 4334 <p><code>start</code>: the index of the first unicode character 
> in the string to
> 4335 copy. Must be greater than or equal to zero, and less than string 
> length
> 4336 ("<code>GetStringLength()</code>").</p>
> 4337
> 4338 <p><code>len</code>: the number of unicode characters to copy. 
> Must be greater
> 4339 than or equal to zero, and "<code>start + len</code>" must be 
> less than
> 4340 "<code>GetStringLength()</code>".</p>
>
>
Done, further updated all "string length" and "array length" to be the 
same form.
> 4. In function.html, what does "this number" refer to in line 4361?
>
> 4359 <p>The <code>len</code> argument specifies the number of
> 4360 <i>unicode characters</i>. The resulting number modified UTF-8 
> encoding
> 4361 characters may be greater than this number. 
> <code>GetStringUTFLength()</code>
> 4362 may be used to determine the maximum size of the required 
> character buffer.</p>
Done: "greater than the given <code>len</code> argument."
>
> 5. In function.htlm, line 4366, change "safetly' to "to safely"
>
> 4366 "<code>memset()</code>") before using this function, in order 
> safetly perform
> 4367 <code>strlen()</code>.</p>
>
>
Done. Nice spotting.
> 6. In jni-6.html can the following:
>
>   15 <p>JNI has been enhanced in Java SE 6 with a few minor changes. 
> The addition of
>   16 the <code>GetObjectRefType</code> function. Deprecated structures
>   17 <code>JDK1_1InitArgs</code> and <code>JDK1_1AttachArgs</code> 
> have been removed.
>   18 And an increment in the JNI version number.</p>
>
> to
>
>   15 <p>JNI has been enhanced in Java SE 6 with a few minor changes. The
>   16 <code>GetObjectRefType</code> function has been added. Deprecated 
> structures
>   17 <code>JDK1_1InitArgs</code> and <code>JDK1_1AttachArgs</code> 
> have been removed.
>   18 The JNI version number has also been incremented.</p>
>
Done.
> Thanks, Harold
>

Cheers
/David Simms


More information about the hotspot-dev mailing list