See gh-24878
This commit is contained in:
Brian Clozel 2020-07-28 14:37:19 +02:00
parent 77137719d8
commit be801fc5fc
4 changed files with 5 additions and 7 deletions

View File

@ -181,7 +181,7 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
new NamedThreadLocal<>("Prototype beans currently in creation"); new NamedThreadLocal<>("Prototype beans currently in creation");
/** Application startup metrics. **/ /** Application startup metrics. **/
private ApplicationStartup applicationStartup = ApplicationStartup.getDefault(); private ApplicationStartup applicationStartup = ApplicationStartup.DEFAULT;
/** /**
* Create a new AbstractBeanFactory. * Create a new AbstractBeanFactory.

View File

@ -145,7 +145,7 @@ public class ConfigurationClassPostProcessor implements BeanDefinitionRegistryPo
/* Using fully qualified class names as default bean names by default. */ /* Using fully qualified class names as default bean names by default. */
private BeanNameGenerator importBeanNameGenerator = IMPORT_BEAN_NAME_GENERATOR; private BeanNameGenerator importBeanNameGenerator = IMPORT_BEAN_NAME_GENERATOR;
private ApplicationStartup applicationStartup = ApplicationStartup.getDefault(); private ApplicationStartup applicationStartup = ApplicationStartup.DEFAULT;
@Override @Override

View File

@ -231,7 +231,7 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
private ApplicationEventMulticaster applicationEventMulticaster; private ApplicationEventMulticaster applicationEventMulticaster;
/** Application startup metrics. **/ /** Application startup metrics. **/
private ApplicationStartup applicationStartup = ApplicationStartup.getDefault(); private ApplicationStartup applicationStartup = ApplicationStartup.DEFAULT;
/** Statically specified listeners. */ /** Statically specified listeners. */
private final Set<ApplicationListener<?>> applicationListeners = new LinkedHashSet<>(); private final Set<ApplicationListener<?>> applicationListeners = new LinkedHashSet<>();

View File

@ -28,12 +28,10 @@ package org.springframework.core.metrics;
public interface ApplicationStartup { public interface ApplicationStartup {
/** /**
* Return a default "no op" {@code ApplicationStartup} implementation. * Default "no op" {@code ApplicationStartup} implementation.
* <p>This variant is designed for minimal overhead and does not record data. * <p>This variant is designed for minimal overhead and does not record data.
*/ */
static ApplicationStartup getDefault() { ApplicationStartup DEFAULT = new DefaultApplicationStartup();
return new DefaultApplicationStartup();
}
/** /**
* Create a new step and marks its beginning. * Create a new step and marks its beginning.