jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Schumacher <felix.schumac...@internetallee.de>
Subject Re: [jmeter] branch master updated: Split long lines
Date Sat, 09 May 2020 17:29:28 GMT

Am 09.05.20 um 18:58 schrieb Philippe Mouawad:
> Hello Felix,
> To what bug this commit is related ?
> Is it 64267 ?

To no real bug (at least to my knowledge), but the code was wrong in
itself. Either we want a InheritableThreadLocal or not.

In the first case we have to use the long winded road as has been
reverted to with this commit. It has been "cleaned up" a while ago and I
think it slipped our eyes, that the clean up was not a "no functional
change" one.

In the latter case, we can use withInitial, but should use the right
class ThreadLocal and not hide the fact, that withInitial is a static
method of ThreadLocal.

Felix

>
> Thanks
> Regards
>
> On Sat, May 9, 2020 at 11:55 AM <fschumacher@apache.org> wrote:
>
>> This is an automated email from the ASF dual-hosted git repository.
>>
>> fschumacher pushed a commit to branch master
>> in repository https://gitbox.apache.org/repos/asf/jmeter.git
>>
>>
>> The following commit(s) were added to refs/heads/master by this push:
>>      new dc3d0e3  Split long lines
>> dc3d0e3 is described below
>>
>> commit dc3d0e3bb700429e4bd3bcc3ace7a7f277e62e36
>> Author: Felix Schumacher <felix.schumacher@internetallee.de>
>> AuthorDate: Sat May 9 11:55:31 2020 +0200
>>
>>     Split long lines
>> ---
>>  .../java/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java     | 4
>> +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git
>> a/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
>> b/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
>> index ee79e64..8d4dd85 100644
>> ---
>> a/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
>> +++
>> b/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
>> @@ -438,7 +438,9 @@ public class HTTPHC4Impl extends HTTPHCAbstractImpl {
>>      /**
>>       * 1 HttpClient instance per combination of (HttpClient,HttpClientKey)
>>       */
>> -    private static final ThreadLocal<Map<HttpClientKey,
>> MutableTriple<CloseableHttpClient, AuthState,
>> PoolingHttpClientConnectionManager>>>HTTPCLIENTS_CACHE_PER_THREAD_AND_HTTPCLIENTKEY
>> = new InheritableThreadLocal<Map<HttpClientKey,
>> MutableTriple<CloseableHttpClient, AuthState,
>> PoolingHttpClientConnectionManager>>>() {
>> +    private static final ThreadLocal<Map<HttpClientKey,
>> MutableTriple<CloseableHttpClient, AuthState,
>> PoolingHttpClientConnectionManager>>>
>> +            HTTPCLIENTS_CACHE_PER_THREAD_AND_HTTPCLIENTKEY = new
>> InheritableThreadLocal<Map<HttpClientKey,
>> +                    MutableTriple<CloseableHttpClient, AuthState,
>> PoolingHttpClientConnectionManager>>>() {
>>          @Override
>>          protected Map<HttpClientKey, MutableTriple<CloseableHttpClient,
>> AuthState, PoolingHttpClientConnectionManager>> initialValue() {
>>              return new HashMap<>(5);
>>
>>

Mime
View raw message