Feedback from JSR-310

Stephen Colebourne scolebourne at joda.org
Wed Dec 12 00:40:32 PST 2012


>From using default methods in interfaces.

I found that pretty much all the calls to super.someDefault() have to
be qualified by the interface type - Intface.super.someDefault().
Perhaps this is required now? If not, maybe it should be required
(reduces risk of change in behaviour if a superclass later adds the
method with the same signature)?

I also found that I had an interface, abstract class, concrete class
hierarchy, where I wanted to use the default interface method from the
concrete class. To do this, I had to add the "implements" clause to
the concrete class even though it was already implemented by the
abstract class. This felt wrong. I understand the reluctance to allow
super calls jumping up the chain, but I think for interfaces the risk
seems lower (only behaviour, not state).

http://hg.openjdk.java.net/threeten/threeten/jdk/file/e951160d841c/src/share/classes/javax/time/chrono/global/ThaiBuddhistDate.java
Had to add implements ChronoLocalDate<ThaiBuddhistChrono>

Stephen


More information about the lambda-dev mailing list