mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-01 10:48:09 +07:00
This patch fixes the notes from the review, it contains:
1. fixing the javadoc for ExpressionUtils#isConversionToStringNecessary
2. properly handling JavaTokenType.MINUS in ExpressionUtils#isDifference
3. properly handling complex PsiPolyadicExpression values in ExpressionUtils#isDifference
4. changing ProblemHighlightType to GENERIC_ERROR_OR_WARNING for
inspecitons like these
5. fixing the comments duplication problem when replacing the old string
with a new one for inspections like stringValue.substring(0, 1).equals("_")
Signed-off-by: Nikita Eshkeev <nikita.eshkeev@jetbrains.com>
GitOrigin-RevId: 907524c9026e2d1d7cd6f0bd7b988e478e73298d
22 lines
766 B
Java
22 lines
766 B
Java
// "Fix all 'Redundant String operation' problems in file" "true"
|
|
class Foo {
|
|
public static void main(String[] args) {
|
|
int i = Integer.parseInt(args[2]);
|
|
int j = Integer.parseInt(args[4]);
|
|
|
|
boolean value = args[0].charAt(4) == '_';
|
|
|
|
if (args[0].charAt(4) == '_') { }
|
|
if (args[0].charAt(4) != '_') { }
|
|
if (args[0].charAt(4) == '_') { }
|
|
if (args[0].charAt(4) != '_') { }
|
|
|
|
if (/* one */args/* two */[/* three */ 0 /* four */].charAt(i /* five */ + 1) == 'x') { }
|
|
/* one */
|
|
if (args/* two */[/* three */ 0 /* four */].charAt(i /* five */ + 1) != 'x') { }
|
|
/* one */
|
|
if (args/* two */[/* three */ 0 /* four */].charAt(i /* five */ + 1) != 'x') { }
|
|
|
|
if (args[0].charAt(i - ((j - 1) - (j + 1))) == '\'') {}
|
|
}
|
|
} |