You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Gary Gregory <ga...@gmail.com> on 2017/05/02 02:02:41 UTC

Re: StopWatch stop

I am down to copying StopWatch as FluentStopWatch and adding "return this;"
to all the void methods.

I can so that in my code base but does it induce vomiting if Commons Lang
has both StopWatch AND FluentStopWatch?

Gary

On Sun, Apr 30, 2017 at 2:47 PM, Gary Gregory <ga...@gmail.com>
wrote:

> Sorry, Commons Lang.
>
> Gary
>
> On Apr 30, 2017 1:47 PM, "Matt Sicker" <bo...@gmail.com> wrote:
>
>> Which subproject are you speaking of anyways?
>>
>> On 30 April 2017 at 15:46, Gary Gregory <ga...@gmail.com> wrote:
>>
>> > A new method perhaps or a new class a la fluent?
>> >
>> > Gary
>> >
>> > On Apr 30, 2017 1:32 PM, "Matt Sicker" <bo...@gmail.com> wrote:
>> >
>> > > 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 <bo...@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 <ga...@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 <ga...@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 <bo...@gmail.com>
>> > > >
>> > >
>> > >
>> > >
>> > > --
>> > > Matt Sicker <bo...@gmail.com>
>> > >
>> >
>>
>>
>>
>> --
>> Matt Sicker <bo...@gmail.com>
>>
>


-- 
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=cadb800f39946ec62ea2b1af9fe6a2b8>

<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=31ecd1f6b6d1eaf8886ac902a24de418%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

Re: StopWatch stop

Posted by Gary Gregory <ga...@gmail.com>.
I suppose another approach is to punt any kind of fluent redo to 4.0, and
break BC at that point, avoiding class duplication.

Gary


On May 3, 2017 4:10 AM, "Benedikt Ritter" <br...@apache.org> wrote:


> Am 02.05.2017 um 04:36 schrieb Matt Sicker <bo...@gmail.com>:
>
> What about a fluent package for classes like this so you can still call it
> StopWatch?

As I’ve argued for the concurrency annotations, I don’t think it’s good
style to package stuff by their technical similarities. So I’d add those
fluent classes along side their classical counterparts.

Further more we had the request to add FluentStringUtils which was a
version of StringUtils with a fluent API. We rejected the request arguing
that while this could be implemented we don’t see this as part of Commons
Lang. Maybe we need to revisit that decision in the light of the current
discussion.

Benedikt

>
> On 1 May 2017 at 21:02, Gary Gregory <ga...@gmail.com> wrote:
>
>> I am down to copying StopWatch as FluentStopWatch and adding "return
this;"
>> to all the void methods.
>>
>> I can so that in my code base but does it induce vomiting if Commons Lang
>> has both StopWatch AND FluentStopWatch?
>>
>> Gary
>>
>> On Sun, Apr 30, 2017 at 2:47 PM, Gary Gregory <ga...@gmail.com>
>> wrote:
>>
>>> Sorry, Commons Lang.
>>>
>>> Gary
>>>
>>> On Apr 30, 2017 1:47 PM, "Matt Sicker" <bo...@gmail.com> wrote:
>>>
>>>> Which subproject are you speaking of anyways?
>>>>
>>>> On 30 April 2017 at 15:46, Gary Gregory <ga...@gmail.com> wrote:
>>>>
>>>>> A new method perhaps or a new class a la fluent?
>>>>>
>>>>> Gary
>>>>>
>>>>> On Apr 30, 2017 1:32 PM, "Matt Sicker" <bo...@gmail.com> wrote:
>>>>>
>>>>>> 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 <bo...@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 <ga...@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 <bo...@gmail.com>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Matt Sicker <bo...@gmail.com>
>>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Matt Sicker <bo...@gmail.com>
>>>>
>>>
>>
>>
>> --
>> 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=cadb800f39946ec62ea2b1af9fe6a2b8>
>>
>> <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
>>
>
>
>
> --
> Matt Sicker <bo...@gmail.com>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org

Re: StopWatch stop

Posted by Benedikt Ritter <br...@apache.org>.
> Am 02.05.2017 um 04:36 schrieb Matt Sicker <bo...@gmail.com>:
> 
> What about a fluent package for classes like this so you can still call it
> StopWatch?

As I’ve argued for the concurrency annotations, I don’t think it’s good style to package stuff by their technical similarities. So I’d add those fluent classes along side their classical counterparts.

Further more we had the request to add FluentStringUtils which was a version of StringUtils with a fluent API. We rejected the request arguing that while this could be implemented we don’t see this as part of Commons Lang. Maybe we need to revisit that decision in the light of the current discussion.

Benedikt

> 
> On 1 May 2017 at 21:02, Gary Gregory <ga...@gmail.com> wrote:
> 
>> I am down to copying StopWatch as FluentStopWatch and adding "return this;"
>> to all the void methods.
>> 
>> I can so that in my code base but does it induce vomiting if Commons Lang
>> has both StopWatch AND FluentStopWatch?
>> 
>> Gary
>> 
>> On Sun, Apr 30, 2017 at 2:47 PM, Gary Gregory <ga...@gmail.com>
>> wrote:
>> 
>>> Sorry, Commons Lang.
>>> 
>>> Gary
>>> 
>>> On Apr 30, 2017 1:47 PM, "Matt Sicker" <bo...@gmail.com> wrote:
>>> 
>>>> Which subproject are you speaking of anyways?
>>>> 
>>>> On 30 April 2017 at 15:46, Gary Gregory <ga...@gmail.com> wrote:
>>>> 
>>>>> A new method perhaps or a new class a la fluent?
>>>>> 
>>>>> Gary
>>>>> 
>>>>> On Apr 30, 2017 1:32 PM, "Matt Sicker" <bo...@gmail.com> wrote:
>>>>> 
>>>>>> 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 <bo...@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 <ga...@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 <bo...@gmail.com>
>>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> --
>>>>>> Matt Sicker <bo...@gmail.com>
>>>>>> 
>>>>> 
>>>> 
>>>> 
>>>> 
>>>> --
>>>> Matt Sicker <bo...@gmail.com>
>>>> 
>>> 
>> 
>> 
>> --
>> 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=cadb800f39946ec62ea2b1af9fe6a2b8>
>> 
>> <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=31ecd1f6b6d1eaf8886ac902a24de418%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
>> 
> 
> 
> 
> -- 
> Matt Sicker <bo...@gmail.com>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: StopWatch stop

Posted by Gary Gregory <ga...@gmail.com>.
I'll note that I had proposed something similar with locks a while back.
This may suffer from the same issue for some: Using AutoCloseable and
try-with-resources in an unusual way.

Gary

On Tue, May 2, 2017 at 4:22 PM, Gary Gregory <ga...@gmail.com> wrote:

> Here is my version based on a fluent version of Apache Commons Lang's
> StopWatch:
>
> https://pastebin.com/biNfwu7S
>
> Example:
>
> try (final StopWatchLogger watch = StopWatchLogger.start(LOGGER,
> Level.DEBUG, "Executing {} {}", connectingIOReactor, "foo")) {
>   connectingIOReactor.execute(connectingEventDispatch);
> }
>
> Logs:
> "Executing 1@connectingIOReactor FOO"
> "[Executing 1@connectingIOReactor FOO] took 00:00:01.224"
>
> Thoughts?
>
> Gary
>
>
> On Mon, May 1, 2017 at 7:42 PM, Gary Gregory <ga...@gmail.com>
> wrote:
>
>> Great idea!
>>
>> Gary
>>
>> On Mon, May 1, 2017 at 7:36 PM, Matt Sicker <bo...@gmail.com> wrote:
>>
>>> What about a fluent package for classes like this so you can still call
>>> it
>>> StopWatch?
>>>
>>> On 1 May 2017 at 21:02, Gary Gregory <ga...@gmail.com> wrote:
>>>
>>> > I am down to copying StopWatch as FluentStopWatch and adding "return
>>> this;"
>>> > to all the void methods.
>>> >
>>> > I can so that in my code base but does it induce vomiting if Commons
>>> Lang
>>> > has both StopWatch AND FluentStopWatch?
>>> >
>>> > Gary
>>> >
>>> > On Sun, Apr 30, 2017 at 2:47 PM, Gary Gregory <ga...@gmail.com>
>>> > wrote:
>>> >
>>> > > Sorry, Commons Lang.
>>> > >
>>> > > Gary
>>> > >
>>> > > On Apr 30, 2017 1:47 PM, "Matt Sicker" <bo...@gmail.com> wrote:
>>> > >
>>> > >> Which subproject are you speaking of anyways?
>>> > >>
>>> > >> On 30 April 2017 at 15:46, Gary Gregory <ga...@gmail.com>
>>> wrote:
>>> > >>
>>> > >> > A new method perhaps or a new class a la fluent?
>>> > >> >
>>> > >> > Gary
>>> > >> >
>>> > >> > On Apr 30, 2017 1:32 PM, "Matt Sicker" <bo...@gmail.com> wrote:
>>> > >> >
>>> > >> > > 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 <bo...@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-2
>>> 0&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 <bo...@gmail.com>
>>> > >> > > >
>>> > >> > >
>>> > >> > >
>>> > >> > >
>>> > >> > > --
>>> > >> > > Matt Sicker <bo...@gmail.com>
>>> > >> > >
>>> > >> >
>>> > >>
>>> > >>
>>> > >>
>>> > >> --
>>> > >> Matt Sicker <bo...@gmail.com>
>>> > >>
>>> > >
>>> >
>>> >
>>> > --
>>> > 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=31ecd1f6b6d1eaf8886ac
>>> 902a24de418%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
>>> >
>>>
>>>
>>>
>>> --
>>> Matt Sicker <bo...@gmail.com>
>>>
>>
>>
>>
>> --
>> 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=cadb800f39946ec62ea2b1af9fe6a2b8>
>>
>> <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=31ecd1f6b6d1eaf8886ac902a24de418%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
>>
>
>
>
> --
> 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=cadb800f39946ec62ea2b1af9fe6a2b8>
>
> <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=31ecd1f6b6d1eaf8886ac902a24de418%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
>



-- 
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=cadb800f39946ec62ea2b1af9fe6a2b8>

<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=31ecd1f6b6d1eaf8886ac902a24de418%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

Re: StopWatch stop

Posted by Gary Gregory <ga...@gmail.com>.
Here is my version based on a fluent version of Apache Commons Lang's
StopWatch:

https://pastebin.com/biNfwu7S

Example:

try (final StopWatchLogger watch = StopWatchLogger.start(LOGGER,
Level.DEBUG, "Executing {} {}", connectingIOReactor, "foo")) {
  connectingIOReactor.execute(connectingEventDispatch);
}

Logs:
"Executing 1@connectingIOReactor FOO"
"[Executing 1@connectingIOReactor FOO] took 00:00:01.224"

Thoughts?

Gary


On Mon, May 1, 2017 at 7:42 PM, Gary Gregory <ga...@gmail.com> wrote:

> Great idea!
>
> Gary
>
> On Mon, May 1, 2017 at 7:36 PM, Matt Sicker <bo...@gmail.com> wrote:
>
>> What about a fluent package for classes like this so you can still call it
>> StopWatch?
>>
>> On 1 May 2017 at 21:02, Gary Gregory <ga...@gmail.com> wrote:
>>
>> > I am down to copying StopWatch as FluentStopWatch and adding "return
>> this;"
>> > to all the void methods.
>> >
>> > I can so that in my code base but does it induce vomiting if Commons
>> Lang
>> > has both StopWatch AND FluentStopWatch?
>> >
>> > Gary
>> >
>> > On Sun, Apr 30, 2017 at 2:47 PM, Gary Gregory <ga...@gmail.com>
>> > wrote:
>> >
>> > > Sorry, Commons Lang.
>> > >
>> > > Gary
>> > >
>> > > On Apr 30, 2017 1:47 PM, "Matt Sicker" <bo...@gmail.com> wrote:
>> > >
>> > >> Which subproject are you speaking of anyways?
>> > >>
>> > >> On 30 April 2017 at 15:46, Gary Gregory <ga...@gmail.com>
>> wrote:
>> > >>
>> > >> > A new method perhaps or a new class a la fluent?
>> > >> >
>> > >> > Gary
>> > >> >
>> > >> > On Apr 30, 2017 1:32 PM, "Matt Sicker" <bo...@gmail.com> wrote:
>> > >> >
>> > >> > > 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 <bo...@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-2
>> 0&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 <bo...@gmail.com>
>> > >> > > >
>> > >> > >
>> > >> > >
>> > >> > >
>> > >> > > --
>> > >> > > Matt Sicker <bo...@gmail.com>
>> > >> > >
>> > >> >
>> > >>
>> > >>
>> > >>
>> > >> --
>> > >> Matt Sicker <bo...@gmail.com>
>> > >>
>> > >
>> >
>> >
>> > --
>> > 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=31ecd1f6b6d1eaf8886ac
>> 902a24de418%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
>> >
>>
>>
>>
>> --
>> Matt Sicker <bo...@gmail.com>
>>
>
>
>
> --
> 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=cadb800f39946ec62ea2b1af9fe6a2b8>
>
> <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=31ecd1f6b6d1eaf8886ac902a24de418%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
>



-- 
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=cadb800f39946ec62ea2b1af9fe6a2b8>

<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=31ecd1f6b6d1eaf8886ac902a24de418%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

Re: StopWatch stop

Posted by sebb <se...@gmail.com>.
Not sure about that.

1) it's not easy to tell which class is being used at a glance
2) cannot easily use both classes at once.
3) auto-complete may pick the wrong one

c.f. java.util.Date and java.sql.Date

I'm not saying the approach should not be used, however it has some
disadvantages.

On 2 May 2017 at 03:42, Gary Gregory <ga...@gmail.com> wrote:
> Great idea!
>
> Gary
>
> On Mon, May 1, 2017 at 7:36 PM, Matt Sicker <bo...@gmail.com> wrote:
>
>> What about a fluent package for classes like this so you can still call it
>> StopWatch?
>>
>> On 1 May 2017 at 21:02, Gary Gregory <ga...@gmail.com> wrote:
>>
>> > I am down to copying StopWatch as FluentStopWatch and adding "return
>> this;"
>> > to all the void methods.
>> >
>> > I can so that in my code base but does it induce vomiting if Commons Lang
>> > has both StopWatch AND FluentStopWatch?
>> >
>> > Gary
>> >
>> > On Sun, Apr 30, 2017 at 2:47 PM, Gary Gregory <ga...@gmail.com>
>> > wrote:
>> >
>> > > Sorry, Commons Lang.
>> > >
>> > > Gary
>> > >
>> > > On Apr 30, 2017 1:47 PM, "Matt Sicker" <bo...@gmail.com> wrote:
>> > >
>> > >> Which subproject are you speaking of anyways?
>> > >>
>> > >> On 30 April 2017 at 15:46, Gary Gregory <ga...@gmail.com>
>> wrote:
>> > >>
>> > >> > A new method perhaps or a new class a la fluent?
>> > >> >
>> > >> > Gary
>> > >> >
>> > >> > On Apr 30, 2017 1:32 PM, "Matt Sicker" <bo...@gmail.com> wrote:
>> > >> >
>> > >> > > 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 <bo...@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 <bo...@gmail.com>
>> > >> > > >
>> > >> > >
>> > >> > >
>> > >> > >
>> > >> > > --
>> > >> > > Matt Sicker <bo...@gmail.com>
>> > >> > >
>> > >> >
>> > >>
>> > >>
>> > >>
>> > >> --
>> > >> Matt Sicker <bo...@gmail.com>
>> > >>
>> > >
>> >
>> >
>> > --
>> > 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=cadb800f39946ec62ea2b1af9fe6a2b8>
>> >
>> > <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
>> >
>>
>>
>>
>> --
>> Matt Sicker <bo...@gmail.com>
>>
>
>
>
> --
> 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=cadb800f39946ec62ea2b1af9fe6a2b8>
>
> <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=31ecd1f6b6d1eaf8886ac902a24de418%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


Re: StopWatch stop

Posted by Gary Gregory <ga...@gmail.com>.
Great idea!

Gary

On Mon, May 1, 2017 at 7:36 PM, Matt Sicker <bo...@gmail.com> wrote:

> What about a fluent package for classes like this so you can still call it
> StopWatch?
>
> On 1 May 2017 at 21:02, Gary Gregory <ga...@gmail.com> wrote:
>
> > I am down to copying StopWatch as FluentStopWatch and adding "return
> this;"
> > to all the void methods.
> >
> > I can so that in my code base but does it induce vomiting if Commons Lang
> > has both StopWatch AND FluentStopWatch?
> >
> > Gary
> >
> > On Sun, Apr 30, 2017 at 2:47 PM, Gary Gregory <ga...@gmail.com>
> > wrote:
> >
> > > Sorry, Commons Lang.
> > >
> > > Gary
> > >
> > > On Apr 30, 2017 1:47 PM, "Matt Sicker" <bo...@gmail.com> wrote:
> > >
> > >> Which subproject are you speaking of anyways?
> > >>
> > >> On 30 April 2017 at 15:46, Gary Gregory <ga...@gmail.com>
> wrote:
> > >>
> > >> > A new method perhaps or a new class a la fluent?
> > >> >
> > >> > Gary
> > >> >
> > >> > On Apr 30, 2017 1:32 PM, "Matt Sicker" <bo...@gmail.com> wrote:
> > >> >
> > >> > > 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 <bo...@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 <bo...@gmail.com>
> > >> > > >
> > >> > >
> > >> > >
> > >> > >
> > >> > > --
> > >> > > Matt Sicker <bo...@gmail.com>
> > >> > >
> > >> >
> > >>
> > >>
> > >>
> > >> --
> > >> Matt Sicker <bo...@gmail.com>
> > >>
> > >
> >
> >
> > --
> > 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=cadb800f39946ec62ea2b1af9fe6a2b8>
> >
> > <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
> >
>
>
>
> --
> Matt Sicker <bo...@gmail.com>
>



-- 
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=cadb800f39946ec62ea2b1af9fe6a2b8>

<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=31ecd1f6b6d1eaf8886ac902a24de418%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

Re: StopWatch stop

Posted by Matt Sicker <bo...@gmail.com>.
What about a fluent package for classes like this so you can still call it
StopWatch?

On 1 May 2017 at 21:02, Gary Gregory <ga...@gmail.com> wrote:

> I am down to copying StopWatch as FluentStopWatch and adding "return this;"
> to all the void methods.
>
> I can so that in my code base but does it induce vomiting if Commons Lang
> has both StopWatch AND FluentStopWatch?
>
> Gary
>
> On Sun, Apr 30, 2017 at 2:47 PM, Gary Gregory <ga...@gmail.com>
> wrote:
>
> > Sorry, Commons Lang.
> >
> > Gary
> >
> > On Apr 30, 2017 1:47 PM, "Matt Sicker" <bo...@gmail.com> wrote:
> >
> >> Which subproject are you speaking of anyways?
> >>
> >> On 30 April 2017 at 15:46, Gary Gregory <ga...@gmail.com> wrote:
> >>
> >> > A new method perhaps or a new class a la fluent?
> >> >
> >> > Gary
> >> >
> >> > On Apr 30, 2017 1:32 PM, "Matt Sicker" <bo...@gmail.com> wrote:
> >> >
> >> > > 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 <bo...@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 <ga...@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 <bo...@gmail.com>
> >> > > >
> >> > >
> >> > >
> >> > >
> >> > > --
> >> > > Matt Sicker <bo...@gmail.com>
> >> > >
> >> >
> >>
> >>
> >>
> >> --
> >> Matt Sicker <bo...@gmail.com>
> >>
> >
>
>
> --
> 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=cadb800f39946ec62ea2b1af9fe6a2b8>
>
> <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=31ecd1f6b6d1eaf8886ac902a24de418%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
>



-- 
Matt Sicker <bo...@gmail.com>