You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This sample code should find the "LO_APPENDED_STRING_IN_FORMAT_STRING" bug warning :
package sample;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
public class Sample {
private static final Logger LOG = LogManager.getLogger();
public static void main(final String[] args) {
LOG.error("main args " + args.length); // should raise LO_APPENDED_STRING_IN_FORMAT_STRING bug warning
}
}
And does it, if compiled with target 1.8, but not if compiled with target 11.
Tested with JDK 11, 17 and 21.
The text was updated successfully, but these errors were encountered:
lgemeinhardt
changed the title
Code compiled with target 11 (and not 1.8) does not find all bugs warnings
Code compiled with target 11 (and not 1.8) does not find all bug warnings
Feb 8, 2024
This sample code should find the "LO_APPENDED_STRING_IN_FORMAT_STRING" bug warning :
And does it, if compiled with target 1.8, but not if compiled with target 11.
Tested with JDK 11, 17 and 21.
The text was updated successfully, but these errors were encountered: