If a subclass of java.awt.Container overrides getComponents(), and the object with overridden getComponents() is serialized and then deserialized, ArrayIndexOutOfBoundsException occurs.
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
at java.awt.Container.readObject(Container.java:3733)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1017)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1896)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:371)
at a.main(a.java:17)
This problem does not occur in jdk6u81. This seems to be a regression.