eagle-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Created] (EAGLE-984) Potential null dereference in SimpleWindowCounter#poll()
Date Thu, 30 Mar 2017 18:45:41 GMT
Ted Yu created EAGLE-984:
----------------------------

             Summary: Potential null dereference in SimpleWindowCounter#poll()
                 Key: EAGLE-984
                 URL: https://issues.apache.org/jira/browse/EAGLE-984
             Project: Eagle
          Issue Type: Bug
            Reporter: Ted Yu
            Priority: Minor


Here is related code:
{code}
    public Tuple2<Long, Long> poll() {
        long oldestTimestamp = timeQueue.poll();
        Tuple2<Long, Long> pair = new Tuple2<>(oldestTimestamp, counter.get(oldestTimestamp));
{code}
We should check the return value from timeQueue.poll() before casting to long.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message