Extract getText() method
This commit is contained in:
+1
-1
@@ -154,7 +154,7 @@ public class IfWhenUtils {
|
||||
builder.elseBranch(branch);
|
||||
} else {
|
||||
String branchConditionText = combineWhenConditions(entry.getConditions(), whenExpression.getSubjectExpression());
|
||||
builder.ifBranch(branchConditionText, branch != null ? branch.getText() : "");
|
||||
builder.ifBranch(branchConditionText, JetPsiUtil.getText(branch));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -188,7 +188,7 @@ public class WhenUtils {
|
||||
if (subject != null) {
|
||||
return toBinaryExpression(parenthesizeIfNeeded(subject), "==", parenthesizeIfNeeded(conditionExpression));
|
||||
}
|
||||
return conditionExpression != null ? conditionExpression.getText() : "";
|
||||
return JetPsiUtil.getText(conditionExpression);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
Reference in New Issue
Block a user