mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 05:09:37 +07:00
rename method (IDEA-CR-60894)
GitOrigin-RevId: 60900578bd58c0f27c80a7eb1dc890f31ca5596b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
3cdf183fd1
commit
6090e522fc
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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) == '\"') {
|
||||
|
||||
@@ -145,7 +145,7 @@ public class PsiLiteralExpressionImpl
|
||||
|
||||
@Nullable
|
||||
public String getInnerText() {
|
||||
return PsiLiteralUtil.getInnerText(this);
|
||||
return PsiLiteralUtil.getStringLiteralContent(this);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
Reference in New Issue
Block a user