<AWT Dev> JDK-8098530: ArrayIndexOutOfBoundsException at sun.awt.X11.XEvent.getFieldsAsString

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Wed Oct 12 17:48:18 UTC 2016


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.


More information about the awt-dev mailing list