我在github上有一个通过编码进行分析的项目.分析建议对以下代码行使用"避免使用null":
def doSomethingWithPath(path:Path) = { require(path != null, "Path should not be null") //<-to avoid ... }
什么是最简单的scala惯用法来修复它?
scala idiomatic preconditions codacy
codacy ×1
idiomatic ×1
preconditions ×1
scala ×1