default methods in super interfaces and serial version id calculation

Mike Duigou mike.duigou at
Thu Jan 24 18:55:42 PST 2013

Hopefully nothing that drastic will be required. I think we just need to ensure that default methods only show up in the getDefinedMethods() list for the Child class and don't show up in the getDeclaredMethods() list.


On Jan 24 2013, at 18:08 , Robert Field wrote:

> Yikes! If we leave default methods in, it will break everybodys serial version id.
> Mike Duigou <mike.duigou at> wrote:
>> A jdk regression test, java/util/EnumSet/BogusEnumSet, fails when combined with the 8001647 Collections default methods patch. 
>> I investigated the root cause with Stuart Marks' knowledgeable assistance and have come up with a unit test which demonstrates the problem. 
>> The broken bit in BogusEnumSet is that interfaces containing default methods currently cause different default serial version ids to generated in Serializable child classes. The root cause is default methods appearing in the Class.getDeclaredMethods() results.
>> I have pushed the test to the lambda repo in :
>> The actual test is located at: jdk/test/java/io/Serializable/
>> Mike

More information about the lambda-dev mailing list