J2K converter applies IfNullToElvisIntention automatically

This commit is contained in:
Valentin Kipyatkov
2015-04-29 17:10:04 +03:00
parent 38f735dcac
commit 7d6145e105
6 changed files with 45 additions and 4 deletions
@@ -0,0 +1,9 @@
import java.io.File;
class C {
String foo(File file) {
File parent = file.getParentFile();
if (parent == null) return "";
return parent.getName();
}
}
@@ -0,0 +1,8 @@
import java.io.File
class C {
fun foo(file: File): String {
val parent = file.getParentFile() ?: return ""
return parent.getName()
}
}