You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Catherine Hope (JIRA)" <ji...@apache.org> on 2009/08/13 17:40:14 UTC

[jira] Updated: (HARMONY-6307) [classlib][luni] java.net.HttpCookie.parse is not threadsafe

     [ https://issues.apache.org/jira/browse/HARMONY-6307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Catherine Hope updated HARMONY-6307:
------------------------------------

    Attachment: 6307-patch.txt

Fix for Java 6 branch

- in HttpCookie: make attributeSet object local
- in HttpCookieTest: new test method that creates some threads and repeats calling HttpCookie.parse and checking the resulting object.  This test will only fail intermittently as it need to hit a timing hole.

> [classlib][luni] java.net.HttpCookie.parse is not threadsafe
> ------------------------------------------------------------
>
>                 Key: HARMONY-6307
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6307
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Java 6 branch, all platforms
>            Reporter: Catherine Hope
>         Attachments: 6307-patch.txt
>
>
> Static method java.net.HttpCookie.parse is not threadsafe in that calling this method across multiple threads (but on thread local objects) will corrupt the resulting HttpCookie objects.  The problem is the class is sharing static Setter objects for each cookie property, to prevent the properties being set multiple times.  The fix is to make these object local.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.