diff --git a/java/java-psi-impl/src/messages/JavaErrorBundle.properties b/java/java-psi-impl/src/messages/JavaErrorBundle.properties index ceb636b41001..3d1bcf2419c1 100644 --- a/java/java-psi-impl/src/messages/JavaErrorBundle.properties +++ b/java/java-psi-impl/src/messages/JavaErrorBundle.properties @@ -330,7 +330,7 @@ empty.character.literal=Empty character literal illegal.line.end.in.string.literal=Illegal line end in string literal unclosed.char.literal=Unclosed character literal illegal.escape.character.in.string.literal=Illegal escape character in string literal -illegal.unicode.escape=Illegal Unicode escape +illegal.unicode.escape=Illegal Unicode escape sequence floating.point.number.too.large=Floating point number too large floating.point.number.too.small=Floating point number too small illegal.underscore=Illegal underscore diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/BadUnicodeEscapeInComment.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/BadUnicodeEscapeInComment.java index 15be8f4a0df3..5dabd70176a3 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/BadUnicodeEscapeInComment.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/BadUnicodeEscapeInComment.java @@ -1,17 +1,17 @@ -// tt \\\uuu00bro +// tt \\\uuu00bro // ken\\ua <- escaped backslash so not an unicode escape // escape at the end 1 \ -// escape at the end 2 \u -// escape at the end 3 \uu -// escape at the end 4 \uu1 -// escape at the end 5 \uu12 -// escape at the end 6 \uu123 -// unicode escaped backslash does not escape next backslash -> \u005c\u +// escape at the end 2 \u +// escape at the end 3 \uu +// escape at the end 4 \uu1 +// escape at the end 5 \uu12 +// escape at the end 6 \uu123 +// unicode escaped backslash does not escape next backslash -> \u005c\u /* in block comment -\u +\u \u000A <- correct escape */ /** - * in javadoc comment \u123 + * in javadoc comment \u123 */ \ No newline at end of file diff --git a/plugins/InspectionGadgets/test/com/siyeh/igtest/internationalization/unnecessary_unicode_escape/UnnecessaryUnicodeEscape.java b/plugins/InspectionGadgets/test/com/siyeh/igtest/internationalization/unnecessary_unicode_escape/UnnecessaryUnicodeEscape.java index 4dbe5d524ee5..8fb394b5981c 100644 --- a/plugins/InspectionGadgets/test/com/siyeh/igtest/internationalization/unnecessary_unicode_escape/UnnecessaryUnicodeEscape.java +++ b/plugins/InspectionGadgets/test/com/siyeh/igtest/internationalization/unnecessary_unicode_escape/UnnecessaryUnicodeEscape.java @@ -12,8 +12,8 @@ class UnnecessaryUnicodeEscape { String str1 = "\u0061"; String str2 = "\\u0061"; // Backslash followed by the characters "u0061" String str3 = "\\\u0061"; // Backslash followed by escape sequence - String str4 = "\u004"; // Too short to be a Unicode escape sequence - String str5 = "\u004g"; // Invalid hex character + String str4 = "\u004"; // Too short to be a Unicode escape sequence + String str5 = "\u004g"; // Invalid hex character // \u0009 // \u000A