mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 06:05:01 +07:00
[java-inspections] IDEA-359749 StringConcatenationArgumentToLogCallInspection could also be triggered by concatenation
GitOrigin-RevId: bb5024a6be79582644fff96b72a8ceeff0fbf15e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
ba6d180392
commit
3288586fdf
+13
@@ -0,0 +1,13 @@
|
||||
import org.slf4j.*;
|
||||
import java.text.MessageFormat;
|
||||
|
||||
class ConcatenationMessageFormat {
|
||||
|
||||
Logger LOG = LoggerFactory.getLogger(ConcatenationMessageFormat.class);
|
||||
|
||||
void f() {
|
||||
LOG.in<caret>fo("{}, 2 " +
|
||||
"""
|
||||
{} {}""", 3.0, 2, "1");
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
import org.slf4j.*;
|
||||
import java.text.MessageFormat;
|
||||
|
||||
class ConcatenationMessageFormat {
|
||||
|
||||
Logger LOG = LoggerFactory.getLogger(ConcatenationMessageFormat.class);
|
||||
|
||||
void f() {
|
||||
LOG.in<caret>fo(MessageFormat.format("{2}, 2 " +
|
||||
"""
|
||||
{1} {0}""", "1", 2, 3.0));
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
import org.slf4j.*;
|
||||
import java.text.MessageFormat;
|
||||
|
||||
class ConcatenationStringFormat {
|
||||
|
||||
Logger LOG = LoggerFactory.getLogger(ConcatenationStringFormat.class);
|
||||
|
||||
void f() {
|
||||
LOG.in<caret>fo("{} something" + " {} {}", "text", true, 1);
|
||||
}
|
||||
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
import org.slf4j.*;
|
||||
import java.text.MessageFormat;
|
||||
|
||||
class ConcatenationStringFormat {
|
||||
|
||||
Logger LOG = LoggerFactory.getLogger(ConcatenationStringFormat.class);
|
||||
|
||||
void f() {
|
||||
LOG.in<caret>fo(String.format("%s something" + " %b %d", "text", true, 1));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user