incubator-directmemory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raffaele P. Guidi" <raffaele.p.gu...@gmail.com>
Subject Re: [jira] [Created] (DIRECTMEMORY-30) Fix Pointer.expired() - have to verify 'expires'
Date Thu, 03 Nov 2011 22:01:38 GMT
I'll check into this

On Thu, Nov 3, 2011 at 3:53 PM, Igor Babalich (Created) (JIRA) <
jira@apache.org> wrote:

> Fix Pointer.expired() - have to verify 'expires'
> ------------------------------------------------
>
>                 Key: DIRECTMEMORY-30
>                 URL: https://issues.apache.org/jira/browse/DIRECTMEMORY-30
>             Project: Apache DirectMemory
>          Issue Type: Bug
>            Reporter: Igor Babalich
>            Priority: Trivial
>
>
> Currently the method is verifying just 'expiresIn' but condition is
>
>   return (expiresIn + created < System.currentTimeMillis());
>
> i.e. it is verifying notExpires().
>
> Could be fixed like this:
>
>        public boolean expired() {
>                if (expiresIn > 0) {
>                        return (created + expiresIn >
> System.currentTimeMillis());
>                } else if (expires > 0) {
>                        return (expires > System.currentTimeMillis());
>                } else {
>                        return false;
>                }
>        }
>
>
> --
> This message is automatically generated by JIRA.
> If you think it was sent incorrectly, please contact your JIRA
> administrators:
> https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message