mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 11:53:49 +07:00
IJ-CR-130369 [java-inspections] IDEA-197280 Non-constant string concatenation as argument" could also be triggered for String.format
- change description GitOrigin-RevId: 0924d1165a47e2d40f3b245adfdc8252f2768f25
This commit is contained in:
committed by
intellij-monorepo-bot
parent
50f4960173
commit
7e047434f3
@@ -1922,7 +1922,7 @@ arrays.as.list.with.zero.or.one.argument.display.name=Call to 'Arrays.asList()'
|
|||||||
arrays.as.list.with.one.argument.problem.descriptor=Call to <code>#ref()</code> with only one argument #loc
|
arrays.as.list.with.one.argument.problem.descriptor=Call to <code>#ref()</code> with only one argument #loc
|
||||||
arrays.as.list.with.zero.arguments.problem.descriptor=Call to <code>#ref()</code> to create an empty List #loc
|
arrays.as.list.with.zero.arguments.problem.descriptor=Call to <code>#ref()</code> to create an empty List #loc
|
||||||
string.concatenation.argument.to.log.call.display.name=Non-constant string concatenation as argument to logging call
|
string.concatenation.argument.to.log.call.display.name=Non-constant string concatenation as argument to logging call
|
||||||
string.concatenation.argument.to.log.call.problem.descriptor=Evaluated string as argument to <code>#ref()</code> logging call #loc
|
string.concatenation.argument.to.log.call.problem.descriptor=Non-constant string as argument to <code>#ref()</code> logging call #loc
|
||||||
string.concatenation.argument.to.log.call.quickfix=Replace concatenation with parameterized log message
|
string.concatenation.argument.to.log.call.quickfix=Replace concatenation with parameterized log message
|
||||||
string.concatenation.argument.to.log.string.format.call.quickfix=Replace 'String.format()' with parameterized log message
|
string.concatenation.argument.to.log.string.format.call.quickfix=Replace 'String.format()' with parameterized log message
|
||||||
string.concatenation.argument.to.log.message.format.call.quickfix=Replace 'Message.format()' with parameterized log message
|
string.concatenation.argument.to.log.message.format.call.quickfix=Replace 'Message.format()' with parameterized log message
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ public class StringConcatenationArgumentToLogCallInspectionTest extends LightJav
|
|||||||
Logger logger = LoggerFactory.getLogger(X.class);
|
Logger logger = LoggerFactory.getLogger(X.class);
|
||||||
final String CONST = "const";
|
final String CONST = "const";
|
||||||
String var = "var";
|
String var = "var";
|
||||||
logger./*Evaluated string as argument to 'debug()' logging call*/debug/**/("string " + var + CONST);
|
logger./*Non-constant string as argument to 'debug()' logging call*/debug/**/("string " + var + CONST);
|
||||||
}
|
}
|
||||||
}"""
|
}"""
|
||||||
);
|
);
|
||||||
@@ -109,8 +109,8 @@ public class StringConcatenationArgumentToLogCallInspectionTest extends LightJav
|
|||||||
class Logging {
|
class Logging {
|
||||||
private static final Logger LOG = LogManager.getLogger();
|
private static final Logger LOG = LogManager.getLogger();
|
||||||
void m(int i) {
|
void m(int i) {
|
||||||
LOG./*Evaluated string as argument to 'info()' logging call*/info/**/("hello? " + i);
|
LOG./*Non-constant string as argument to 'info()' logging call*/info/**/("hello? " + i);
|
||||||
LOG./*Evaluated string as argument to 'fatal()' logging call*/fatal/**/("you got me " + i);
|
LOG./*Non-constant string as argument to 'fatal()' logging call*/fatal/**/("you got me " + i);
|
||||||
}
|
}
|
||||||
}""");
|
}""");
|
||||||
}
|
}
|
||||||
@@ -124,7 +124,7 @@ public class StringConcatenationArgumentToLogCallInspectionTest extends LightJav
|
|||||||
private static final Logger logger = LogManager.getFormattedLogger();
|
private static final Logger logger = LogManager.getFormattedLogger();
|
||||||
|
|
||||||
public static void m(String a) {
|
public static void m(String a) {
|
||||||
logger./*Evaluated string as argument to 'info()' logging call*/info/**/("1" + "2" + a);
|
logger./*Non-constant string as argument to 'info()' logging call*/info/**/("1" + "2" + a);
|
||||||
}
|
}
|
||||||
}""");
|
}""");
|
||||||
}
|
}
|
||||||
@@ -135,8 +135,8 @@ public class StringConcatenationArgumentToLogCallInspectionTest extends LightJav
|
|||||||
class Logging {
|
class Logging {
|
||||||
private static final Logger LOG = LogManager.getLogger();
|
private static final Logger LOG = LogManager.getLogger();
|
||||||
void m(int i) {
|
void m(int i) {
|
||||||
LOG.atDebug()./*Evaluated string as argument to 'log()' logging call*/log/**/("hello? " + i);
|
LOG.atDebug()./*Non-constant string as argument to 'log()' logging call*/log/**/("hello? " + i);
|
||||||
LOG.atInfo()./*Evaluated string as argument to 'log()' logging call*/log/**/("you got me " + i);
|
LOG.atInfo()./*Non-constant string as argument to 'log()' logging call*/log/**/("you got me " + i);
|
||||||
}
|
}
|
||||||
}""");
|
}""");
|
||||||
}
|
}
|
||||||
@@ -148,7 +148,7 @@ public class StringConcatenationArgumentToLogCallInspectionTest extends LightJav
|
|||||||
class X {
|
class X {
|
||||||
void foo() {
|
void foo() {
|
||||||
Logger log = LoggerFactory.getLogger(X.class);
|
Logger log = LoggerFactory.getLogger(X.class);
|
||||||
log./*Evaluated string as argument to 'info()' logging call*/info/**/(String.format("%s %d", "1", 1));
|
log./*Non-constant string as argument to 'info()' logging call*/info/**/(String.format("%s %d", "1", 1));
|
||||||
}
|
}
|
||||||
}"""
|
}"""
|
||||||
);
|
);
|
||||||
@@ -161,7 +161,7 @@ public class StringConcatenationArgumentToLogCallInspectionTest extends LightJav
|
|||||||
class X {
|
class X {
|
||||||
void foo() {
|
void foo() {
|
||||||
Logger log = LoggerFactory.getLogger(X.class);
|
Logger log = LoggerFactory.getLogger(X.class);
|
||||||
log./*Evaluated string as argument to 'info()' logging call*/info/**/(MessageFormat.format("{1}, {0}", "1", 2));
|
log./*Non-constant string as argument to 'info()' logging call*/info/**/(MessageFormat.format("{1}, {0}", "1", 2));
|
||||||
}
|
}
|
||||||
}"""
|
}"""
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user