mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-13 20:12:14 +00:00
Omit stacktraces on ClassNotFoundException in PluginStrategy classloading (#4957)
* Omit stacktraces on ClassNotFoundException in PluginStrategy classloading * Modify implementation to not fill in stacktraces by default * Apply suggestions from code review * Restrict withFillInStackTracesOnClassNotFoundException() at Beta API
This commit is contained in:
1 parent
1131c031c0
commit
b62b6dd830
4 files changed
+96
-4
No files matched your search
@@ -1213,8 +1213,13 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas
|
||||
LOGGER.info("Falling back to ClassicPluginStrategy");
|
||||
}
|
||||
|
||||
// default and fallback
|
||||
return new ClassicPluginStrategy(this);
|
||||
// Default and fallback strategy
|
||||
// The default Plugin Manager implementation does not propagate/log stacktraces for ClassNotFoundExceptions,
|
||||
// hence stacktraces are omitted by default for better performance.
|
||||
boolean fillInClassNotFoundExceptionStackTraces =SystemProperties.getBoolean(
|
||||
ClassicPluginStrategy.class.getName() + ".fillInClassNotFoundExceptionStackTraces", false);
|
||||
return new ClassicPluginStrategy(this)
|
||||
.withFillInStackTracesOnClassNotFoundException(fillInClassNotFoundExceptionStackTraces);
|
||||
}
|
||||
|
||||
public PluginStrategy getPluginStrategy() {
|
||||
|
||||
Reference in new issue
Block a user