Polishing
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -377,7 +377,7 @@ public class ClassPathScanningCandidateComponentProvider implements EnvironmentC
|
||||
for (TypeFilter filter : this.includeFilters) {
|
||||
String stereotype = extractStereotype(filter);
|
||||
if (stereotype == null) {
|
||||
throw new IllegalArgumentException("Failed to extract stereotype from "+ filter);
|
||||
throw new IllegalArgumentException("Failed to extract stereotype from " + filter);
|
||||
}
|
||||
types.addAll(index.getCandidateTypes(basePackage, stereotype));
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -896,7 +896,7 @@ class ConfigurationClassParser {
|
||||
return new AssignableTypeFilter(clazz).match((MetadataReader) this.source, metadataReaderFactory);
|
||||
}
|
||||
|
||||
public ConfigurationClass asConfigClass(ConfigurationClass importedBy) throws IOException {
|
||||
public ConfigurationClass asConfigClass(ConfigurationClass importedBy) {
|
||||
if (this.source instanceof Class) {
|
||||
return new ConfigurationClass((Class<?>) this.source, importedBy);
|
||||
}
|
||||
@@ -964,7 +964,7 @@ class ConfigurationClassParser {
|
||||
return result;
|
||||
}
|
||||
|
||||
public Set<SourceClass> getAnnotations() throws IOException {
|
||||
public Set<SourceClass> getAnnotations() {
|
||||
Set<SourceClass> result = new LinkedHashSet<>();
|
||||
for (String className : this.metadata.getAnnotationTypes()) {
|
||||
try {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -438,7 +438,7 @@ public class ConfigurationClassPostProcessor implements BeanDefinitionRegistryPo
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object postProcessBeforeInitialization(Object bean, String beanName) {
|
||||
public Object postProcessBeforeInitialization(Object bean, String beanName) {
|
||||
if (bean instanceof ImportAware) {
|
||||
ImportRegistry ir = this.beanFactory.getBean(IMPORT_REGISTRY_BEAN_NAME, ImportRegistry.class);
|
||||
AnnotationMetadata importingClass = ir.getImportingClassFor(bean.getClass().getSuperclass().getName());
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -269,7 +269,7 @@ public abstract class AbstractApplicationEventMulticaster
|
||||
* type before trying to instantiate it.
|
||||
* <p>If this method returns {@code true} for a given listener as a first pass,
|
||||
* the listener instance will get retrieved and fully evaluated through a
|
||||
* {@link #supportsEvent(ApplicationListener,ResolvableType, Class)} call afterwards.
|
||||
* {@link #supportsEvent(ApplicationListener, ResolvableType, Class)} call afterwards.
|
||||
* @param listenerType the listener's type as determined by the BeanFactory
|
||||
* @param eventType the event type to check
|
||||
* @return whether the given listener should be included in the candidates
|
||||
|
||||
@@ -1243,7 +1243,7 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
|
||||
@Override
|
||||
@Nullable
|
||||
public <A extends Annotation> A findAnnotationOnBean(String beanName, Class<A> annotationType)
|
||||
throws NoSuchBeanDefinitionException{
|
||||
throws NoSuchBeanDefinitionException {
|
||||
|
||||
assertBeanFactoryActive();
|
||||
return getBeanFactory().findAnnotationOnBean(beanName, annotationType);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -329,7 +329,7 @@ public class ResourceBundleMessageSource extends AbstractResourceBasedMessageSou
|
||||
try {
|
||||
return bundle.getString(key);
|
||||
}
|
||||
catch (MissingResourceException ex){
|
||||
catch (MissingResourceException ex) {
|
||||
// Assume key not found for some other reason
|
||||
// -> do NOT throw the exception to allow for checking parent message source.
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -36,14 +36,13 @@ import org.springframework.lang.Nullable;
|
||||
* or through a {@link org.springframework.beans.factory.config.CustomScopeConfigurer} bean.
|
||||
*
|
||||
* <p>{@code SimpleThreadScope} <em>does not clean up any objects</em> associated with it.
|
||||
* As such, it is typically preferable to use
|
||||
* {@link org.springframework.web.context.request.RequestScope RequestScope}
|
||||
* in web environments.
|
||||
* It is therefore typically preferable to use a request-bound scope implementation such
|
||||
* as {@code org.springframework.web.context.request.RequestScope} in web environments,
|
||||
* implementing the full lifecycle for scoped attributes (including reliable destruction).
|
||||
*
|
||||
* <p>For an implementation of a thread-based {@code Scope} with support for
|
||||
* destruction callbacks, refer to the
|
||||
* <a href="http://www.springbyexample.org/examples/custom-thread-scope-module.html">
|
||||
* Spring by Example Custom Thread Scope Module</a>.
|
||||
* <p>For an implementation of a thread-based {@code Scope} with support for destruction
|
||||
* callbacks, refer to
|
||||
* <a href="http://www.springbyexample.org/examples/custom-thread-scope-module.html">Spring by Example</a>.
|
||||
*
|
||||
* <p>Thanks to Eugene Kuleshov for submitting the original prototype for a thread scope!
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user