J2K converter applies IfNullToElvisIntention automatically
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user