Add test for #5152
This commit is contained in:
@ -595,8 +595,28 @@ public class GuardLogStatementTest {
|
||||
|
||||
public void test() {
|
||||
LOG.info(
|
||||
"Some message here : foo={}",
|
||||
GuardLogStatementTest.MY_CONSTANT
|
||||
"Some message here : foo={}",
|
||||
GuardLogStatementTest.MY_CONSTANT
|
||||
);
|
||||
}
|
||||
}
|
||||
]]></code>
|
||||
</test-code>
|
||||
|
||||
<test-code>
|
||||
<description>#5152 "this" do not require guards</description>
|
||||
<expected-problems>0</expected-problems>
|
||||
<code><![CDATA[
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
|
||||
public class GuardLogStatementTest {
|
||||
private static final Logger LOG = LogManager.getLogger(GuardLogStatementTest.class);
|
||||
|
||||
public void test() {
|
||||
LOG.info(
|
||||
"Some message here : foo={}",
|
||||
this
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user