RFR: 8191637: Interface with defaults invalid compiler warning for Serializable

Jonathan Gibbons jonathan.gibbons at oracle.com
Fri Jan 5 00:54:38 UTC 2018


Please review this fix for JDK-8191637, which modifies an earlier fix 
for JDK-6356530.

Prior to the fix for JDK-6356530, all abstract classes (including 
interfaces) were excluded from the check for serialVersionUID.  The fix 
for JDK-6356530 modified the check, but focussed on concrete methods 
(including default methods for interfaces) instead of serializable fields.

This fix updates the check so that interfaces are never checked, and 
abstract classes are only checked if they have serializable (non-static, 
non-transient) fields.

JBS 1: https://bugs.openjdk.java.net/browse/JDK-8191637
JBS 2: https://bugs.openjdk.java.net/browse/JDK-6356530
Webrev: http://cr.openjdk.java.net/~jjg/8191637/webrev.00/

-- Jon


More information about the compiler-dev mailing list