报告 map 与不产生结果的表达式的搭配使用。
map
如果可能,此检查会建议将此类 map 调用替换为 foreach 调用。
foreach
示例:
Seq(1, 2).map(println)
在应用快速修复后:
Seq(1, 2).foreach(println)