Skip to content

Commit a2a2332

Browse files
committed
Minor stylistic improvement
1 parent 2d22c2b commit a2a2332

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adapter/src/main/kotlin/org/javacs/ktda/classpath/ProjectClassesResolver.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ private fun resolveIfExists(root: Path, vararg segments: String): Path? {
2525
for (segment in segments) {
2626
result = result.resolve(segment)
2727
}
28-
return if (Files.exists(result)) result else null
28+
return result.takeIf { Files.exists(it) }
2929
}

0 commit comments

Comments
 (0)