Gary,

On 7/12/17 10:33 PM, Gary Gregory wrote:
> On Wed, Jul 12, 2017 at 9:05 AM, Christopher Schultz <[email protected]>
> wrote:
> 
>> Gary,
>>
>> Nope. That field is 100% undocumented (https://hc.apache.org/
>> httpcomponents-client-ga/httpclient/apidocs/org/apache/http/client/config/
>> RequestConfig.html#DEFAULT) so messing-around with it seems like a bad
>> idea.
>>
>> What do you suggest, specifically? It's a static final field, but I don't
>> believe we are running under a SecurityManager, so I could probably use
>> reflection to blast-away the value with one of my choosing.\
>>
> 
> Ah, crud, I thought the field was mutable. Let's do a What-if: What if that
> field was mutable (and documented), would that solve your problem? You
> could try... ;-)

I can definitely try. I don't actually mind using reflection to bash my
way in, either (this is a fairly desperate situation for me), but
changing the field still looks like it's not going to have any effect...
unless I'm reading the code incorrectly, the DEFAULT member is
completely ignored by the rest of the code in the class.

Thanks,
-chris

>> I haven't looked at the code... is the DEFAULT object cloned (at least
>> semantically) whenever a new RequestConfig object is built to act as the
>> default values for everything?
>>
>> Thanks,
>> -chris
>>
>> On 2017-07-11 18:43 (-0400), Gary Gregory <[email protected]> wrote:
>>> Hi Chris,
>>>
>>> Have you tried
>>> resetting org.apache.http.client.config.RequestConfig.DEFAULT?
>>>
>>> Gary
>>>
>>> On Tue, Jul 11, 2017 at 12:54 PM, Christopher Schultz <
>> [email protected]>
>>> wrote:
>>>
>>>> All,
>>>>
>>>> I have a conflict between two products that must operate in the same
>> JVM
>>>> and same ClassLoader. One product was based upon http-client 4.3 and
>>>> another based upon 4.5. Nearly everything works (thanks for the great
>>>> backward compatibility, folks!) except that the product relying upon
>> 4.3
>>>> semantics is expecting the default value for
>> staleConnectionCheckEnabled to
>>>> be "true" while it is "false" in the latest versions.
>>>>
>>>> Unfortunately, patching the code of the "older" product is very ...
>>>> challenging.
>>>>
>>>> Is there a system property or anything like that I can use to change
>> this
>>>> default? Maybe a static setDefaultStateConnectionCheckEnabled(boolean)
>>>> method? I realize that the whole staleConnectionCheckEnabled setting is
>>>> deprecated, but having changed the default value for it is causing me
>> some
>>>> backward-compatibility headaches.
>>>>
>>>> Thanks,
>>>> -chris
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [email protected]
>>>> For additional commands, e-mail: [email protected]
>>>>
>>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
> 

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to