[java-inspections] IDEA-360134 Support %n in format string

GitOrigin-RevId: c7d3b60eec4a72ded2132a3ab24e035baf2c1241
This commit is contained in:
Mikhail Pyltsin
2024-10-07 13:20:17 +02:00
committed by intellij-monorepo-bot
parent 77ec6df673
commit 81fe531f88
4 changed files with 54 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
import org.slf4j.*;
import java.text.MessageFormat;
class SimpleStringFormat {
Logger LOG = LoggerFactory.getLogger(SimpleStringFormat.class);
void f() {
LOG.in<caret>fo("foo \n{}", "bar");
LOG.info("foo %%n{}", "bar");
LOG.info("foo %%\n{}", "bar");
}
}

View File

@@ -0,0 +1,14 @@
import org.slf4j.*;
import java.text.MessageFormat;
class SimpleStringFormat {
Logger LOG = LoggerFactory.getLogger(SimpleStringFormat.class);
void f() {
LOG.in<caret>fo(String.format("foo %n%s", "bar"));
LOG.info(String.format("foo %%n%s", "bar"));
LOG.info(String.format("foo %%%n%s", "bar"));
}
}