mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 22:09:38 +07:00
[java-inspections] IDEA-360134 Support %n in format string
GitOrigin-RevId: c7d3b60eec4a72ded2132a3ab24e035baf2c1241
This commit is contained in:
committed by
intellij-monorepo-bot
parent
77ec6df673
commit
81fe531f88
@@ -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");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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"));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user