The implementation of default methods (original) (raw)
Doug Lea dl at cs.oswego.edu
Sat Dec 15 09:14:46 PST 2012
- Previous message: The implementation of default methods
- Next message: The implementation of default methods
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 12/15/12 10:56, Brian Goetz wrote:
For Iterator.remove, I think the real constraint is: the JDK must provide a default implementation (since this is only an issue for compatibility across JDKs). Since the only reasonable default would be to throw something, we might as well specify what is thrown, since this degree of freedom serves noone: the JDK must provide a default that throws UOE.
Pedantic mode: In which case the javadoc should say "always throws UOE".
To be even more pedantic, it should say "always throws UOE without first doing anything else you should know about, like erasing your disk". But frame-axioms are usually implicit in these kinds of specs. (But not always...)
-Doug
- Previous message: The implementation of default methods
- Next message: The implementation of default methods
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the lambda-libs-spec-experts mailing list