incubator-directmemory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Igor Babalich (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DIRECTMEMORY-30) Fix Pointer.expired() - have to verify 'expires'
Date Thu, 03 Nov 2011 14:53:32 GMT
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
View raw message