rename method (IDEA-CR-60894)

GitOrigin-RevId: 60900578bd58c0f27c80a7eb1dc890f31ca5596b
This commit is contained in:
Bas Leijdekkers
2020-04-03 14:15:49 +02:00
committed by intellij-monorepo-bot
parent 3cdf183fd1
commit 6090e522fc
3 changed files with 3 additions and 3 deletions

View File

@@ -152,7 +152,7 @@ public class TextBlockMigrationInspection extends AbstractBaseJavaLocalInspectio
@Nullable
private static String getLiteralText(@NotNull PsiLiteralExpression literal) {
if (!literal.isTextBlock() && !(literal.getType() instanceof PsiPrimitiveType)) return PsiLiteralUtil.getInnerText(literal);
if (!literal.isTextBlock() && !(literal.getType() instanceof PsiPrimitiveType)) return PsiLiteralUtil.getStringLiteralContent(literal);
Object value = literal.getValue();
return value == null ? null : value.toString();
}

View File

@@ -402,7 +402,7 @@ public class PsiLiteralUtil {
}
@Nullable
public static String getInnerText(PsiLiteralExpression expression) {
public static String getStringLiteralContent(PsiLiteralExpression expression) {
String text = expression.getText();
int textLength = text.length();
if (textLength > 1 && text.charAt(0) == '\"' && text.charAt(textLength - 1) == '\"') {

View File

@@ -145,7 +145,7 @@ public class PsiLiteralExpressionImpl
@Nullable
public String getInnerText() {
return PsiLiteralUtil.getInnerText(this);
return PsiLiteralUtil.getStringLiteralContent(this);
}
@Nullable