calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Hyde <jh...@apache.org>
Subject Fwd: New Defects reported by Coverity Scan for Apache Calcite
Date Thu, 27 Apr 2017 18:16:13 GMT
Jesus,

Coverity found a possible bug in code you just added. Can you take a look please.

Julian


> Begin forwarded message:
> 
> From: scan-admin@coverity.com
> Subject: New Defects reported by Coverity Scan for Apache Calcite
> Date: April 26, 2017 at 8:54:21 PM PDT
> To: jhyde@apache.org
> 
> 
> 
> ________________________________________________________________________________________________________
> *** CID 144066:  API usage errors  (INVALIDATE_ITERATOR)
> /core/src/main/java/org/apache/calcite/rel/rules/AbstractMaterializedViewRule.java: 950
in org.apache.calcite.rel.rules.AbstractMaterializedViewRule.generateTableMappings(com.google.common.collect.Multimap)()
> 944         }
> 945         result.add(HashBiMap.<RelTableRef, RelTableRef>create());
> 946         for (Entry<RelTableRef, Collection<RelTableRef>> e : multiMapTables.asMap().entrySet())
{
> 947           boolean added = false;
> 948           for (RelTableRef target : e.getValue()) {
> 949             if (added) {
>>>>    CID 144066:  API usage errors  (INVALIDATE_ITERATOR)
>>>>    Attempting to obtain another element from "result" after it's been modified.
> 950               for (BiMap<RelTableRef, RelTableRef> m : result) {
> 951                 final BiMap<RelTableRef, RelTableRef> newM =
> 952                     HashBiMap.<RelTableRef, RelTableRef>create(m);
> 953                 newM.put(e.getKey(), target);
> 954                 result.add(newM);
> 955               }
> 


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