Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 57566200B6D for ; Tue, 23 Aug 2016 21:24:45 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 55D25160AAD; Tue, 23 Aug 2016 19:24:45 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 291CE160A81 for ; Tue, 23 Aug 2016 21:24:44 +0200 (CEST) Received: (qmail 7989 invoked by uid 500); 23 Aug 2016 19:24:43 -0000 Mailing-List: contact log4j-dev-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Log4J Developers List" Reply-To: "Log4J Developers List" Delivered-To: mailing list log4j-dev@logging.apache.org Received: (qmail 7979 invoked by uid 99); 23 Aug 2016 19:24:43 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Aug 2016 19:24:43 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id DEDB3CABDF for ; Tue, 23 Aug 2016 19:24:42 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.198 X-Spam-Level: * X-Spam-Status: No, score=1.198 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id vM3MOlPYvF9X for ; Tue, 23 Aug 2016 19:24:41 +0000 (UTC) Received: from mail-oi0-f43.google.com (mail-oi0-f43.google.com [209.85.218.43]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id A98785FC1F for ; Tue, 23 Aug 2016 19:24:40 +0000 (UTC) Received: by mail-oi0-f43.google.com with SMTP id f189so210013392oig.3 for ; Tue, 23 Aug 2016 12:24:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=6QxrQGgYIPs2/t+GDyM0ZLg4ye6WABqPwi7MzNjF3Yw=; b=Ox2HnP0PmEkyeQFP/uLxMBbWU/hq/u9kYIC/Dqr11k/EmEEpJ0wHDsE2vvO0A9XX6C sNKq6GJl69xbOVljz4o3e2Dmrp6dPxHLibMBvB5cNwdGEBd0fJdqbp5MYD99LfwwbcnL IwnImIQaVY2twM12oKIRnVQ3JwEKeBIXx2TQQb7UjSWBR2Lg8W3RwzQ/MFez8DMPjTPR 1fxWYVQhniFGDRDHIEOPLnfB1M97ykx25XY08kjHIGTXKMxCBv6lTr8PthyWW3keGcDF 6rrRg+RJ75XghO/Rr7xmTo9+3MYK0OPvK+sT+AHwXmqR2XSmiAif4kOoQ99EerQGR6oJ +R9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=6QxrQGgYIPs2/t+GDyM0ZLg4ye6WABqPwi7MzNjF3Yw=; b=fkEQqf5rScC/XSNXxQ1mLNVuvIAezwR1YjEgBGZ+Xv1nbmqEv/BU3IhlakW5M6a6i2 udHqJdzVVsJxXPqdskWlStQqVj1STmBy7KhdH7NQfZUCBVj/cZeAxBXUm+geJREYS4g4 dHdKOx8LZW2zQ2K6OK1eeoIMlCZ2E6PJxYKnme8JYZFif50Y2EicEXSvYxyTTKsRj6lI QNfiNSkVeBx8Idd+Z7pOslRrrqiTk3uiiIgiNbPt1CVGihFJXD1tNGNMIuPSqCIrgDQe lhvkzLAqLALx9AefsOYCy19vQyS3aU7AcHIvOeqnAxRQ03PGOqz+kti55eb9AdPyMqDA ESsw== X-Gm-Message-State: AEkoouvKRXleDEj30j5YfJx8P2sX8+Vvxc2Eiktbltsul6Nt3QP7vpmefMYSP4CuojQKhw1vlZrIkRRM73cIgA== X-Received: by 10.202.114.79 with SMTP id p76mr18268659oic.183.1471980279926; Tue, 23 Aug 2016 12:24:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.20.203 with HTTP; Tue, 23 Aug 2016 12:24:39 -0700 (PDT) In-Reply-To: References: <173DC9F1-44EE-46E1-8A29-3FDAB314AD01@dslextreme.com> <1DE4B895-694B-4F25-8547-0E6A3D8D3180@gmail.com> From: Gary Gregory Date: Tue, 23 Aug 2016 12:24:39 -0700 Message-ID: Subject: Re: ThreadContextMap2 To: Log4J Developers List Content-Type: multipart/alternative; boundary=001a1134f972b39628053ac21d97 archived-at: Tue, 23 Aug 2016 19:24:45 -0000 --001a1134f972b39628053ac21d97 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable TCM2 extending TCM cannot affect BC. Now, some classes now implement TCM2, which should also be OK. Gary On Tue, Aug 23, 2016 at 12:20 PM, Matt Sicker wrote: > I know we added TCM2 to preserve backwards compatibility. By making TCM2 > extend TCM and the other changes, this won't affect binary or source > compatibility, will it? > > On 23 August 2016 at 13:58, Gary Gregory wrote: > >> I made the change for ThreadContextMap2 to extend ThreadContextMap >> (yesterday). >> >> Gary >> >> On Mon, Aug 22, 2016 at 1:48 PM, Gary Gregory >> wrote: >> >>> Why doesn't ThreadContextMap2 extend ThreadContextMap? This feels highl= y >>> unusual. >>> >>> Gary >>> >>> On Sat, Aug 20, 2016 at 5:10 PM, Gary Gregory >>> wrote: >>> >>>> >>>> On Aug 20, 2016 4:47 PM, "Remko Popma" wrote: >>>> > >>>> > Do you have anything specific in mind? >>>> > Otherwise something may come out of my ongoing work for LOG4J2-1010, >>>> LOG4J2-1447, LOG4J2-1349, so I would prefer to wait until that takes s= hape. >>>> >>>> Nothing specific since we have putAll in there now. >>>> >>>> Gary >>>> >>>> > >>>> > On Sun, Aug 21, 2016 at 8:04 AM, Gary Gregory >>>> wrote: >>>> >> >>>> >> All right, topic closed for Map then. Since we have TCM2, now is th= e >>>> time to add anything else. Check? >>>> >> >>>> >> Gary >>>> >> >>>> >> >>>> >> On Aug 20, 2016 3:05 PM, "Remko Popma" >>>> wrote: >>>> >>> >>>> >>> I agree with Ralph. >>>> >>> >>>> >>> I am working on custom implementations of ThreadContextMap >>>> (LOG4J2-1010, LOG4J2-1447, LOG4J2-1349) and I'm very glad the interfac= e is >>>> small. >>>> >>> >>>> >>> My rule of thumb for API design is YAGNI: don't add until you >>>> really need it, otherwise it'll get in the way. >>>> >>> >>>> >>> Remko >>>> >>> >>>> >>> Sent from my iPhone >>>> >>> >>>> >>> On 2016/08/21, at 4:59, Ralph Goers >>>> wrote: >>>> >>> >>>> >>>> 1. Why? >>>> >>>> 2. Why do you need to implement equals and hashcode? What other >>>> map are you going to compare it with? >>>> >>>> 2. Which version? Java 8 added a bunch of new methods. >>>> >>>> >>>> >>>> I don=E2=80=99t really view the thread context map as a Map. It i= s really >>>> nothing more than a bunch of keys and values that I want to store that= are >>>> probably not really directly related with each other, much like HTTP >>>> session attributes. When there are cases of wanting to iterate throug= h the >>>> whole map we first get a copy of it. >>>> >>>> >>>> >>>> Ralph >>>> >>>> >>>> >>>>> On Aug 20, 2016, at 11:01 AM, Gary Gregory < >>>> garydgregory@gmail.com> wrote: >>>> >>>>> >>>> >>>>> Fair enough. >>>> >>>>> >>>> >>>>> I am wondering if there is a design reason not to implement Map >>>> now that we have the opportunity with the TCM2 interface. I'd take a c= rack >>>> at it. >>>> >>>>> >>>> >>>>> Gary >>>> >>>>> >>>> >>>>> >>>> >>>>> On Aug 20, 2016 10:39 AM, "Ralph Goers" < >>>> ralph.goers@dslextreme.com> wrote: >>>> >>>>>> >>>> >>>>>> Because Map has a lot more methods that weren=E2=80=99t needed = and I >>>> didn=E2=80=99t want to implement? >>>> >>>>>> >>>> >>>>>> Ralph >>>> >>>>>> >>>> >>>>>>> On Aug 20, 2016, at 10:16 AM, Gary Gregory < >>>> garydgregory@gmail.com> wrote: >>>> >>>>>>> >>>> >>>>>>> Hi All: >>>> >>>>>>> >>>> >>>>>>> Now that we have ThreadContextMap2: >>>> >>>>>>> >>>> >>>>>>> Why don't we do ThreadContextMap2 extends Map? >>>> >>>>>>> >>>> >>>>>>> Why did ThreadContextMap initially not extends Map>>> String>? >>>> >>>>>>> >>>> >>>>>>> Gary >>>> >>>>>>> >>>> >>>>>>> -- >>>> >>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org >>>> >>>>>>> Java Persistence with Hibernate, Second Edition >>>> >>>>>>> JUnit in Action, Second Edition >>>> >>>>>>> Spring Batch in Action >>>> >>>>>>> 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 >>> >>> JUnit in Action, Second Edition >>> Spring Batch in Action >>> 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 >> >> JUnit in Action, Second Edition >> Spring Batch in Action >> Blog: http://garygregory.wordpress.com >> Home: http://garygregory.com/ >> Tweet! http://twitter.com/GaryGregory >> > > > > -- > Matt Sicker > --=20 E-Mail: garydgregory@gmail.com | ggregory@apache.org Java Persistence with Hibernate, Second Edition JUnit in Action, Second Edition Spring Batch in Action Blog: http://garygregory.wordpress.com Home: http://garygregory.com/ Tweet! http://twitter.com/GaryGregory --001a1134f972b39628053ac21d97 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
TCM2 extending TCM cannot affect BC. Now, some classes now= implement TCM2, which should also be OK.

Gary

On Tue, Aug 23,= 2016 at 12:20 PM, Matt Sicker <boards@gmail.com> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px= #ccc solid;padding-left:1ex">
I know we added TCM2 to pres= erve backwards compatibility. By making TCM2 extend TCM and the other chang= es, this won't affect binary or source compatibility, will it?

On 23 August 2016 at= 13:58, Gary Gregory <garydgregory@gmail.com> wrote:
I made the change for=C2= =A0ThreadContextMap2=C2=A0to extend=C2=A0<= /span>ThreadContextMap (yesterday).=

Gary

On Mon, Aug 22, 2016 at 1:48 PM, Gary= Gregory <garydgregory@gmail.com> wrote:
Why doesn't=C2=A0ThreadContextMap2= extend=C2=A0ThreadContextMap? This feels highly unusual.

Gary

On Sat, Aug 20, 201= 6 at 5:10 PM, Gary Gregory <garydgregory@gmail.com> wro= te:


On Aug 20, 2016 4:47 PM, "Remko Popma" <remko.popma@gmail.com> wrote: >
> Do you have anything specific in mind?
> Otherwise something may come out of my ongoing work for=C2=A0LOG4J2-10= 10, LOG4J2-1447, LOG4J2-1349, so I would prefer to wait until that takes sh= ape.

Nothing specific since we have putAll in there now.

Gary


>
> On Sun, Aug 21, 2016 at 8:04 AM, Gary Gregory <garydgregory@gmail.com> wrot= e:
>>
>> All right, topic closed for Map then. Since we have TCM2, now is t= he time to add anything else. Check?
>>
>> Gary
>>
>>
>> On Aug 20, 2016 3:05 PM, "Remko Popma" <remko.popma@gmail.com>= wrote:
>>>
>>> I agree with Ralph.=C2=A0
>>>
>>> I am working on custom implementations of ThreadContextMap (LO= G4J2-1010, LOG4J2-1447, LOG4J2-1349) and I'm very glad the interface is= small.=C2=A0
>>>
>>> My rule of thumb for API design is YAGNI: don't add until = you really need it, otherwise it'll get in the way.=C2=A0
>>>
>>> Remko
>>>
>>> Sent from my iPhone
>>>
>>> On 2016/08/21, at 4:59, Ralph Goers <ralph.goers@dslextreme.com>= ; wrote:
>>>
>>>> 1. Why? =C2=A0
>>>> 2. Why do you need to implement equals and hashcode? What = other map are you going to compare it with?
>>>> 2. Which version? Java 8 added a bunch of new methods.
>>>>
>>>> I don=E2=80=99t really view the thread context map as a Ma= p. It is really nothing more than a bunch of keys and values that I want to= store that are probably not really directly related with each other, much = like HTTP session attributes.=C2=A0 When there are cases of wanting to iter= ate through the whole map we first get a copy of it.
>>>>
>>>> Ralph
>>>>
>>>>> On Aug 20, 2016, at 11:01 AM, Gary Gregory <garydgregory@gmail.com= > wrote:
>>>>>
>>>>> Fair enough.
>>>>>
>>>>> I am wondering if there is a design reason not to impl= ement Map now that we have the opportunity with the TCM2 interface. I'd= take a crack at it.
>>>>>
>>>>> Gary
>>>>>
>>>>>
>>>>> On Aug 20, 2016 10:39 AM, "Ralph Goers" <= ralph.goers= @dslextreme.com> wrote:
>>>>>>
>>>>>> Because Map has a lot more methods that weren=E2= =80=99t needed and I didn=E2=80=99t want to implement?
>>>>>>
>>>>>> Ralph
>>>>>>
>>>>>>> On Aug 20, 2016, at 10:16 AM, Gary Gregory <= ;garydgregory@g= mail.com> wrote:
>>>>>>>
>>>>>>> Hi All:
>>>>>>>
>>>>>>> Now that we have=C2=A0ThreadContextMap2:
>>>>>>>
>>>>>>> Why don't we do ThreadContextMap2 extends = Map<String, String>?
>>>>>>>
>>>>>>> Why did=C2=A0ThreadContextMap=C2=A0initially n= ot extends Map<String, String>?
>>>>>>>
>>>>>>> Gary
>>>>>>>
>>>>>>> --
>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>>> Java Persistence with Hibernate, Second Editio= n
>>>>>>> JUnit in Action, Second Edition
>>>>>>> Spring Batch in Action
>>>>>>> Blog: http://garygregory.wordpress.com
>>>>>>> Home: http://garygregory.com/
>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>
>>>>>>
>>>>
>




--



--



--
Matt Sicker <boards@gmail.com>



--
--001a1134f972b39628053ac21d97--