Java to Kotlin converter: minor refactoring of switch conversion + no need for empty else
This commit is contained in:
@@ -5,8 +5,7 @@ public class NonDefault {
|
||||
val value = 3
|
||||
val valueString = ""
|
||||
when (value) {
|
||||
else -> {
|
||||
}
|
||||
|
||||
}
|
||||
System.out.println(valueString)
|
||||
}
|
||||
|
||||
@@ -14,8 +14,6 @@ public class NonDefault {
|
||||
3 -> {
|
||||
valueString = "THREE"
|
||||
}
|
||||
else -> {
|
||||
}
|
||||
}
|
||||
System.out.println(valueString)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user