commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Sicker <boa...@gmail.com>
Subject Re: StopWatch stop
Date Sun, 30 Apr 2017 20:32:40 GMT
Yup, here it is:
13.4.15. Method Result Type

Changing the result type of a method, or replacing a result type with void,
or replacing void with a result type, has the combined effect of deleting
the old method and adding a new method with the new result type or newly
void result (see §13.4.12
<https://docs.oracle.com/javase/specs/jls/se7/html/jls-13.html#jls-13.4.12>
).

For purposes of binary compatibility, adding or removing a method or
constructor m whose return type involves type variables (§4.4
<https://docs.oracle.com/javase/specs/jls/se7/html/jls-4.html#jls-4.4>) or
parameterized types (§4.5
<https://docs.oracle.com/javase/specs/jls/se7/html/jls-4.html#jls-4.5>) is
equivalent to the addition (respectively, removal) of the an otherwise
equivalent method whose return type is the erasure (§4.6
<https://docs.oracle.com/javase/specs/jls/se7/html/jls-4.html#jls-4.6>) of
the return type of m.

On 30 April 2017 at 15:30, Matt Sicker <boards@gmail.com> wrote:

> https://docs.oracle.com/javase/specs/jls/se7/html/jls-13.html
>
> A reference to a method must be resolved at compile time to a symbolic
> reference to the erasure (§4.6
> <https://docs.oracle.com/javase/specs/jls/se7/html/jls-4.html#jls-4.6>)
> of the qualifying type of the invocation, plus the erasure of the signature
> (§8.4.2
> <https://docs.oracle.com/javase/specs/jls/se7/html/jls-8.html#jls-8.4.2>)
> of the method.
>
> I'm getting the impression here that the ABI follows the same rules as
> using MethodHandle.invokeExact().
>
> On 30 April 2017 at 15:21, Gary Gregory <garydgregory@gmail.com> wrote:
>
>> On Apr 30, 2017 1:19 PM, "Oliver Heger" <oliver.heger@oliver-heger.de>
>> wrote:
>>
>> I think client code has to be recompiled, otherwise a NoSuchMethodError
>> is thrown.
>>
>>
>>
>> Dang it. Are you sure?
>>
>> Gary
>>
>>
>> Oliver
>>
>> Am 30.04.2017 um 21:24 schrieb Matt Sicker:
>> > That sort of thing changes the binary signature, but source
>> compatibility
>> > is retained.
>> >
>> > On 30 April 2017 at 14:20, Gary Gregory <garydgregory@gmail.com> wrote:
>> >
>> >> Hi,
>> >>
>> >> Would it break BC to change StopWatch.stop() to return "this"?
>> >>
>> >> Gary
>> >>
>> >> --
>> >> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> >> Java Persistence with Hibernate, Second Edition
>> >> <https://www.amazon.com/gp/product/1617290459/ref=as_li_
>> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
>> >> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b
>> 1af9fe6a2b8>
>> >>
>> >> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>> >> 1617290459>
>> >> JUnit in Action, Second Edition
>> >> <https://www.amazon.com/gp/product/1935182021/ref=as_li_
>> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
>> >> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de4
>> 18%22
>> >>>
>> >>
>> >> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>> >> 1935182021>
>> >> Spring Batch in Action
>> >> <https://www.amazon.com/gp/product/1935182951/ref=as_li_
>> >> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
>> >> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
>> >> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> >> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>> >> 1935182951>
>> >> Blog: http://garygregory.wordpress.com
>> >> Home: http://garygregory.com/
>> >> Tweet! http://twitter.com/GaryGregory
>> >>
>> >
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>
>
>
> --
> Matt Sicker <boards@gmail.com>
>



-- 
Matt Sicker <boards@gmail.com>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message