On Sat, Feb 27, 2016 at 2:01 AM, <s...@apache.org> wrote:

> Author: sebb
> Date: Sat Feb 27 01:01:07 2016
> New Revision: 1732590
>
> URL: http://svn.apache.org/viewvc?rev=1732590&view=rev
> Log:
> Revert change that broke JMX compatibility
> TODO fix GUI to support change in default
>
> Modified:
>
> jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CookieManager.java
>
> Modified:
> jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CookieManager.java
> URL:
> http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CookieManager.java?rev=1732590&r1=1732589&r2=1732590&view=diff
>
> ==============================================================================
> ---
> jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CookieManager.java
> (original)
> +++
> jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CookieManager.java
> Sat Feb 27 01:01:07 2016
> @@ -101,8 +101,13 @@ public class CookieManager extends Confi
>      private transient CookieHandler cookieHandler;
>
>      private transient CollectionProperty initialCookies;
> +
> +    // MUST NOT BE CHANGED
>
A more explicit note should be here to explain why it must not be changed:
- Reference the bug or the case

> +    @SuppressWarnings("deprecation") // cannot be changed
> +    public static final String DEFAULT_POLICY =
> CookieSpecs.BROWSER_COMPATIBILITY;
>
Thinking more about it, keeping "Wrong Default" while the good one are in
GUI does not seem to me great:
- Code readability, HC4CookieHandler is the real default, developers or
users might think it is still HC3CookieHandler
- These Constants will disappear in next HttpClient 5 version , they are
already deprecated


>
> -    public static final String DEFAULT_IMPLEMENTATION =
> HC4CookieHandler.class.getName();
> +    // MUST NOT BE CHANGED
> +    public static final String DEFAULT_IMPLEMENTATION =
> HC3CookieHandler.class.getName();
>
>      public CookieManager() {
>          clearCookies(); // Ensure that there is always a collection
> available
> @@ -119,11 +124,11 @@ public class CookieManager extends Confi
>      }
>
>      public String getPolicy() {
> -        return getPropertyAsString(POLICY,
> HC4CookieHandler.DEFAULT_POLICY_NAME);
> +        return getPropertyAsString(POLICY, DEFAULT_POLICY);
>      }
>
>      public void setCookiePolicy(String policy){
> -        setProperty(POLICY, policy, HC4CookieHandler.DEFAULT_POLICY_NAME);
> +        setProperty(POLICY, policy, DEFAULT_POLICY);
>      }
>
>      public CollectionProperty getCookies() {
>
>
>


-- 
Cordialement.
Philippe Mouawad.

Reply via email to