Update LogAdapter to allow build-time code removal
Allow for example to remove those classes and 90 related methods when Logback is used: - org.apache.commons.logging.LogAdapter$JavaUtilAdapter - org.apache.commons.logging.LogAdapter$JavaUtilLog - org.apache.commons.logging.LogAdapter$LocationResolvingLogRecord - org.apache.commons.logging.LogAdapter$Log4jAdapter - org.apache.commons.logging.LogAdapter$Log4jLog - org.apache.commons.logging.LogAdapter$LogApi - org.apache.logging.log4j.message.ObjectMessage - org.apache.logging.log4j.message.ReusableObjectMessage - org.apache.logging.log4j.simple.SimpleLoggerContext - org.apache.logging.log4j.simple.SimpleLoggerContextFactory Closes gh-29506
This commit is contained in:
@@ -36,7 +36,8 @@ class PreComputeFieldFeature implements Feature {
|
||||
Pattern.compile(Pattern.quote("org.springframework.core.NativeDetector#imageCode")),
|
||||
Pattern.compile(Pattern.quote("org.springframework.") + ".*#.*Present"),
|
||||
Pattern.compile(Pattern.quote("org.springframework.") + ".*#.*PRESENT"),
|
||||
Pattern.compile(Pattern.quote("reactor.") + ".*#.*Available")
|
||||
Pattern.compile(Pattern.quote("reactor.") + ".*#.*Available"),
|
||||
Pattern.compile(Pattern.quote("org.apache.commons.logging.LogAdapter") + "#.*Present")
|
||||
};
|
||||
|
||||
private final ThrowawayClassLoader throwawayClassLoader = new ThrowawayClassLoader(PreComputeFieldFeature.class.getClassLoader());
|
||||
|
||||
Reference in New Issue
Block a user