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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org For additional commands, e-mail: commits-h...@druid.apache.org