<AWT Dev> JDK-8098530: ArrayIndexOutOfBoundsException at sun.awt.X11.XEvent.getFieldsAsString
Vladislav Rassokhin
vladislav.rassokhin at jetbrains.com
Mon Oct 17 12:12:51 UTC 2016
Hi Sergey,
For me issue and patch are quite simple so can be applied without test.
I'm just end user of jre and really annoyed by this exception clogs
application logs.
It took 15 minutes year ago to find that bug and vote for it, 15 minutes
last week to fix that using grep and vim.
Unfortunately I've no spare time to learn how to create tests for openjdk,
sign CLA and do other stuff, so asked our jdk team to send patch somewhere.
Seems openjdk contributing process is quite complicated for simple fix.
Anyway I'd attach patch to issue.
On Wed, Oct 12, 2016 at 8:48 PM, Sergey Bylokhov <Sergey.Bylokhov at oracle.com
> wrote:
> Is it possible to create a test for this issue?
>
> On 12.10.16 19:07, Sergey Malenkov wrote:
>
>> Hi all,
>>
>> Could you please consider the following changes to fix JDK-8098530?
>>
>> --- src/solaris/classes/sun/awt/X11/generator/WrapperGenerator.java
>> (revision f0ae41314e223bf1b97c8126ac2b0d6edb5ee99d)
>> +++ src/solaris/classes/sun/awt/X11/generator/WrapperGenerator.java
>> (revision )
>> @@ -690,7 +690,7 @@
>> if (type == AtomicType.TYPE_ATOM) {
>> pw.println("\t\tret.append(\"" + name + " = \"
>> ).append( XAtom.get(get_" + name + "()) ).append(\", \");");
>> } else if (name.equals("type")) {
>> - pw.println("\t\tret.append(\"type = \").append(
>> XlibWrapper.eventToString[get_type()] ).append(\", \");");
>> + pw.println("\t\tret.append(\"type = \").append(
>> XlibWrapper.getEventToString(get_type()) ).append(\", \");");
>> } else if (name.equals("window")){
>> pw.println("\t\tret.append(\"window = \" ).append(
>> getWindow(get_window()) ).append(\", \");");
>> } else if (type == AtomicType.TYPE_ARRAY) {
>>
>> The sun.awt.X11.XlibWrapper class provides a method, which handles such
>> errors.
>> We should not access to array directly.
>>
>> --
>> Best regards,
>> Sergey A. Malenkov
>>
>
>
> --
> Best regards, Sergey.
>
--
Vladislav Rassokhin
Java developer (TeamCity)
JetBrains
https://www.jetbrains.com
The Drive to Develop
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20161017/dfa4917d/attachment.html>
More information about the awt-dev
mailing list