Add test case for #3436

This commit is contained in:
Juan Martín Sotuyo Dodero 2024-03-25 00:44:12 -03:00
parent 9d9d5d0a52
commit d1eb55741f

View File

@ -309,6 +309,33 @@ public class ProperLoggerSample {
public PropperLoggerSample() {
log = LogFactory.getLog(ProperLoggerSample.class);
}
}
]]></code>
</test-code>
<test-code>
<description>[java] ProperLogger gives false positives for inner classes #3436</description>
<expected-problems>0</expected-problems>
<code><![CDATA[
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class ResultHolders {
private ResultHolders() {
super();
}
private static class SynchronizedHolder {
private static final Logger LOG = LoggerFactory.getLogger(SynchronizedHolder.class);
}
private static class JMSHolder {
private static final Logger LOG = LoggerFactory.getLogger(SynchronizedHolder.class);
}
static class ResultMessage {
private static final Logger LOG = LoggerFactory.getLogger(ResultMessage.class);
}
}
]]></code>
</test-code>