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

Junjie Peng reassigned DERBY-3798:
----------------------------------

    Assignee: Junjie Peng

> Remove unnecessary call to Hashtable.get() in 
> TableScanResultSet.getNextRowCore()
> ---------------------------------------------------------------------------------
>
>                 Key: DERBY-3798
>                 URL: https://issues.apache.org/jira/browse/DERBY-3798
>             Project: Derby
>          Issue Type: Improvement
>          Components: Newcomer, SQL
>    Affects Versions: 10.5.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Junjie Peng
>            Priority: Trivial
>
> I came across this piece of code in TableScanResultSet.getNextRowCore():
>                                               if (past2FutureTbl.get(rowLoc) 
> != null)
>                                               {
>                                                       
> past2FutureTbl.remove(rowLoc);
>                                                       continue;
>                                               }
> I believe the call to Hashtable.get() is unnecessary since Hashtable.remove() 
> returns the object it removed or null if the key was not in the table. So I 
> believe the code could be simplified like this without changing the behaviour:
>     if (past2FutureTbl.remove(rowLoc) != null) {
>         continue;
>     }

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

Reply via email to