You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/08/05 17:09:01 UTC

[GitHub] [incubator-druid] leventov opened a new issue #8241: Prohibit creating collections from stream.collect(...) using Structural Search inspection

leventov opened a new issue #8241: Prohibit creating collections from stream.collect(...) using Structural Search inspection
URL: https://github.com/apache/incubator-druid/issues/8241
 
 
   1.
   ```
   new $Coll$($stream$.collect($collector$))
   ```
   The whole match filter: type=java.util.Collection, check "Within type hierarchy".
   
   2. The same about `Map`
   
   3.
   ```
   $Colls$.$factory$($stream$.collect($collector$))
   ```
   Filter on `Colls`: regex `Lists|Sets|Maps` - this is to catch Guava's factory methods like `Sets.newHashSet()`.
   
   There are violations of these rules in the codebase. See the instruction about how to add a rule [here](https://github.com/apache/incubator-druid/blob/ac856fe4c179093c0a5e309a2e988c54a86e89c5/dev/teamcity.md#creating-a-custom-inspection-from-a-structural-search-pattern).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org