Re: signatures that are recorded for default methods

2012-12-16 Thread David Holmes
On 15/12/2012 1:01 AM, Paul Benedict wrote: David, forgive me for lousy sentence construction :-) There's no way to say The default implementation does... and not have it be part of the interface spec. Whatever the default method does becomes the stated contract for any other implementation of

Re: signatures that are recorded for default methods

2012-12-14 Thread Peter Levart
On 12/14/2012 07:21 AM, David Holmes wrote: Paul, On 14/12/2012 9:46 AM, Paul Benedict wrote: Lance, Good questions. Someone with authority will surely answer, but here's my armchair opinion... If the Javadoc is to specify how the default method executes, than that would naturally infer all

Re: signatures that are recorded for default methods

2012-12-14 Thread Peter Levart
On 12/14/2012 10:06 AM, Peter Levart wrote: On 12/14/2012 07:21 AM, David Holmes wrote: Paul, On 14/12/2012 9:46 AM, Paul Benedict wrote: Lance, Good questions. Someone with authority will surely answer, but here's my armchair opinion... If the Javadoc is to specify how the default method

Re: signatures that are recorded for default methods

2012-12-14 Thread Chris Hegarty
On 14/12/2012 09:41, Peter Levart wrote: On 12/14/2012 10:06 AM, Peter Levart wrote: On 12/14/2012 07:21 AM, David Holmes wrote: Paul, On 14/12/2012 9:46 AM, Paul Benedict wrote: Lance, Good questions. Someone with authority will surely answer, but here's my armchair opinion... If the

Re: signatures that are recorded for default methods

2012-12-14 Thread Peter Levart
On 12/14/2012 01:41 PM, Ricky Clarkson wrote: Surely a default method that all subclasses are instructed to override just shouldn't exist, right? Then the compiler will 'instruct' subtypes to implement it automatically (i.e., by failing to compile). I just wanted to illustrate how a

Re: signatures that are recorded for default methods

2012-12-13 Thread Leonid Arbouzov
Hello Lance, My understanding would be that the signature test should check that interface method is marked as default method but do not track the code in its default body (assuming that the body is not a part of a spec - API javadoc). (I've confirmed that with the signature test developer)

Re: signatures that are recorded for default methods

2012-12-13 Thread Joe Darcy
Hello, As with concrete methods on abstract classes, I would expect the specifications of the default methods to often contain text akin to This default implementation does x, y, and z since if the method is to be called by subtypes, the self-use patterns in the default method need to be

Re: signatures that are recorded for default methods

2012-12-13 Thread Leonid Arbuzov
Good point, Joe. Those extra assertions for default methods can be checked by regular API tests separately from signature tests. Thanks, -leonid On 12/13/2012 1:05 PM, Joe Darcy wrote: Hello, As with concrete methods on abstract classes, I would expect the specifications of the default

Re: signatures that are recorded for default methods

2012-12-13 Thread David Holmes
As a case in point Akhil just asked for this to be reviewed: http://cr.openjdk.java.net/~akhil/8005051.0/webrev/src/share/classes/java/util/Iterator.java.frames.html and there is no mention that the remove() implementation actually throws the exception, nor how forEach does its work. David

Re: signatures that are recorded for default methods

2012-12-13 Thread David Holmes
Paul, On 14/12/2012 9:46 AM, Paul Benedict wrote: Lance, Good questions. Someone with authority will surely answer, but here's my armchair opinion... If the Javadoc is to specify how the default method executes, than that would naturally infer all default implementations must have a stated

signatures that are recorded for default methods

2012-12-06 Thread Lance Andersen - Oracle
Folks, Will the signatures for interfaces that are recorded by the TCKs for interfaces record the fact that a method includes a default method? or will it just record the method definition? I am assuming it will, but I know there has been discussion that a implementor could choose a different