Hi Sergey,

Updated:
http://cr.openjdk.java.net/~azvegint/jdk/9/6788138/01/

- This two line was added by the dm, in the fix for "Fixed size problem in getStringBytes" in 2003. Note that the storage has "length +1" size. Why?

May be there was an attempt to use a NULL-terminated string(why?), but since we passing to SetByteArrayRegion length( not length + 1) it makes no sense. We passing result of getStringBytes to a String constructor, so we don't need a trailing \0.

Thanks,

Alexander.

On 03/21/2014 02:51 PM, Sergey Bylokhov wrote:
Hi, Alexander.
A few notes.
 - documentation of this method is wrong.(copypaste from XFree)
- This two line was added by the dm, in the fix for "Fixed size problem in getStringBytes" in 2003. Note that the storage has "length +1" size. Why?

On 3/21/14 2:27 PM, Alexander Zvegintsev wrote:
Hello AWT team,

please review the fix
http://cr.openjdk.java.net/~azvegint/jdk/9/6788138/00/
for the issue
https://bugs.openjdk.java.net/browse/JDK-6788138


Currently we use this function to get Window Manager name from native only.
It happens only once at startup, hence this leak is not noticeable.




Reply via email to