You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jcs-dev@jakarta.apache.org by "Matthias Kerkhoff (JIRA)" <ji...@apache.org> on 2007/12/17 17:07:43 UTC

[jira] Created: (JCS-36) client count decreased too often in IndexedDiskCacheManager.release

client count decreased too often in IndexedDiskCacheManager.release
-------------------------------------------------------------------

                 Key: JCS-36
                 URL: https://issues.apache.org/jira/browse/JCS-36
             Project: JCS
          Issue Type: Bug
          Components: Indexed Disk Cache
    Affects Versions: jcs-1.3, jcs-1.4-dev
            Reporter: Matthias Kerkhoff
            Assignee: Aaron Smuts


The release() method decreases the client count TWICE during each invocation. As getInstance increases the client count only once release will not work as expected:

    public void release()
    {
        clients--;

        if ( --clients != 0 )
        {
            return;
        }

should be changed into

    public void release()
    {
        if ( --clients != 0 )
        {
            return;
        }


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


---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-dev-help@jakarta.apache.org


[jira] Closed: (JCS-36) client count decreased too often in IndexedDiskCacheManager.release

Posted by "Aaron Smuts (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCS-36?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aaron Smuts closed JCS-36.
--------------------------

       Resolution: Fixed
    Fix Version/s: jcs-1.4-dev

Done.

> client count decreased too often in IndexedDiskCacheManager.release
> -------------------------------------------------------------------
>
>                 Key: JCS-36
>                 URL: https://issues.apache.org/jira/browse/JCS-36
>             Project: JCS
>          Issue Type: Bug
>          Components: Indexed Disk Cache
>    Affects Versions: jcs-1.3, jcs-1.4-dev
>            Reporter: Matthias Kerkhoff
>            Assignee: Aaron Smuts
>             Fix For: jcs-1.4-dev
>
>
> The release() method decreases the client count TWICE during each invocation. As getInstance increases the client count only once release will not work as expected:
>     public void release()
>     {
>         clients--;
>         if ( --clients != 0 )
>         {
>             return;
>         }
> should be changed into
>     public void release()
>     {
>         if ( --clients != 0 )
>         {
>             return;
>         }

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


---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-dev-help@jakarta.apache.org