Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: spring-projects/spring-framework
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.3.27.RELEASE
Choose a base ref
...
head repository: spring-projects/spring-framework
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v4.3.28.RELEASE
Choose a head ref
  • 19 commits
  • 57 files changed
  • 3 contributors

Commits on Apr 28, 2020

  1. Copy the full SHA
    16d4e0e View commit details

Commits on Jun 10, 2020

  1. Copy the full SHA
    31cda09 View commit details
  2. Copy the full SHA
    700fede View commit details
  3. Copy the full SHA
    9c73023 View commit details
  4. Copy the full SHA
    2010956 View commit details
  5. Copy the full SHA
    00c9875 View commit details
  6. Polishing

    jhoeller committed Jun 10, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    2c1cca6 View commit details
  7. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    323977b View commit details

Commits on Jun 11, 2020

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    85e3f23 View commit details
  2. Polishing

    jhoeller committed Jun 11, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    3aae8b2 View commit details

Commits on Jun 17, 2020

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    299e2c8 View commit details

Commits on Jun 23, 2020

  1. Polishing

    jhoeller committed Jun 23, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    b5887bf View commit details

Commits on Jul 17, 2020

  1. Clarify enforceInitMethod/enforceDestroyMethod default values

    Closes gh-25402
    
    (cherry picked from commit 5846d9c)
    jhoeller committed Jul 17, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    94d459e View commit details
  2. Polishing

    jhoeller committed Jul 17, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    f38ab38 View commit details

Commits on Jul 19, 2020

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    6d524e1 View commit details

Commits on Jul 20, 2020

  1. Align default values with 5.0.x

    Closes gh-25414
    rstoyanchev committed Jul 20, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    7077346 View commit details
  2. Copy the full SHA
    93e42b8 View commit details
  3. Defer creating logger in StandardWebSocketHandlerAdapter to instantia…

    …tion time
    
    Closes gh-25427
    
    (cherry picked from commit 64f4703)
    jhoeller committed Jul 20, 2020
    Copy the full SHA
    d865460 View commit details

Commits on Jul 21, 2020

  1. Copy the full SHA
    ed5277f View commit details
Showing with 386 additions and 297 deletions.
  1. +1 −1 gradle.properties
  2. +3 −4 ...aop/src/main/java/org/springframework/aop/aspectj/annotation/ReflectiveAspectJAdvisorFactory.java
  3. +3 −9 spring-aop/src/main/java/org/springframework/aop/aspectj/autoproxy/AspectJPrecedenceComparator.java
  4. +3 −3 spring-aop/src/main/java/org/springframework/aop/config/AopNamespaceHandler.java
  5. +2 −1 ...ava/org/springframework/beans/factory/aspectj/AbstractInterfaceDrivenDependencyInjectionAspect.aj
  6. +8 −4 ...aspects/src/main/java/org/springframework/beans/factory/aspectj/AnnotationBeanConfigurerAspect.aj
  7. +5 −5 spring-beans/src/main/java/org/springframework/beans/CachedIntrospectionResults.java
  8. +6 −7 spring-beans/src/main/java/org/springframework/beans/factory/annotation/Lookup.java
  9. +7 −7 ...s/src/main/java/org/springframework/beans/factory/support/AbstractAutowireCapableBeanFactory.java
  10. +13 −5 spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanDefinition.java
  11. +2 −2 spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanFactory.java
  12. +13 −1 spring-beans/src/main/java/org/springframework/beans/factory/support/BeanDefinitionDefaults.java
  13. +2 −1 spring-context-support/src/main/java/org/springframework/cache/caffeine/CaffeineCache.java
  14. +1 −2 spring-context-support/src/main/java/org/springframework/cache/ehcache/EhCacheCache.java
  15. +2 −1 spring-context-support/src/main/java/org/springframework/cache/ehcache/EhCacheCacheManager.java
  16. +6 −5 spring-context-support/src/main/java/org/springframework/cache/jcache/JCacheCache.java
  17. +11 −8 spring-context-support/src/main/java/org/springframework/cache/jcache/JCacheCacheManager.java
  18. +2 −2 ...xt-support/src/main/java/org/springframework/cache/jcache/config/AbstractJCacheConfiguration.java
  19. +8 −3 ...context-support/src/main/java/org/springframework/scheduling/commonj/WorkManagerTaskExecutor.java
  20. +5 −4 spring-context/src/main/java/org/springframework/cache/interceptor/CacheAspectSupport.java
  21. +3 −2 spring-context/src/main/java/org/springframework/cache/support/NoOpCache.java
  22. +2 −2 spring-context/src/main/java/org/springframework/cache/support/NoOpCacheManager.java
  23. +5 −4 spring-context/src/main/java/org/springframework/context/ConfigurableApplicationContext.java
  24. +15 −22 ...text/src/main/java/org/springframework/context/support/AbstractRefreshableApplicationContext.java
  25. +7 −4 ...ontext/src/main/java/org/springframework/ejb/config/AbstractJndiLocatingBeanDefinitionParser.java
  26. +2 −2 spring-context/src/main/java/org/springframework/jmx/export/metadata/AbstractJmxAttribute.java
  27. +6 −1 spring-context/src/main/java/org/springframework/scheduling/concurrent/ConcurrentTaskExecutor.java
  28. +4 −3 ...g-context/src/main/java/org/springframework/scheduling/concurrent/DefaultManagedTaskExecutor.java
  29. +8 −1 spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolTaskExecutor.java
  30. +6 −1 spring-core/src/main/java/org/springframework/core/task/SimpleAsyncTaskExecutor.java
  31. +9 −2 spring-core/src/main/java/org/springframework/core/task/TaskDecorator.java
  32. +6 −1 spring-core/src/main/java/org/springframework/core/task/support/TaskExecutorAdapter.java
  33. +7 −7 spring-core/src/main/java/org/springframework/util/CollectionUtils.java
  34. +3 −3 spring-core/src/main/java/org/springframework/util/LinkedCaseInsensitiveMap.java
  35. +3 −3 spring-core/src/main/java/org/springframework/util/LinkedMultiValueMap.java
  36. +13 −10 spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcOperations.java
  37. +9 −4 spring-jdbc/src/main/java/org/springframework/jdbc/core/StatementCreatorUtils.java
  38. +56 −54 spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterJdbcOperations.java
  39. +1 −4 spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DataSourceTransactionManager.java
  40. +17 −13 spring-messaging/src/main/java/org/springframework/messaging/support/AbstractMessageChannel.java
  41. +13 −11 spring-orm/src/main/java/org/springframework/orm/jpa/JpaTransactionManager.java
  42. +6 −1 spring-tx/src/main/java/org/springframework/jca/work/WorkManagerTaskExecutor.java
  43. +10 −9 spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAspectSupport.java
  44. +5 −5 spring-tx/src/main/java/org/springframework/transaction/jta/WebSphereUowTransactionManager.java
  45. +5 −4 spring-web/src/main/java/org/springframework/web/bind/annotation/CrossOrigin.java
  46. +5 −5 spring-web/src/main/java/org/springframework/web/context/request/WebRequest.java
  47. +1 −4 spring-web/src/main/java/org/springframework/web/cors/CorsConfiguration.java
  48. +3 −3 spring-web/src/main/java/org/springframework/web/util/UriComponentsBuilder.java
  49. +12 −10 spring-web/src/test/java/org/springframework/web/util/UriComponentsBuilderTests.java
  50. +5 −4 spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/CorsRegistration.java
  51. +2 −2 spring-webmvc/src/main/java/org/springframework/web/servlet/view/AbstractTemplateViewResolver.java
  52. +5 −5 spring-webmvc/src/test/java/org/springframework/web/servlet/config/MvcNamespaceTests.java
  53. +15 −10 ...-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/CrossOriginTests.java
  54. +1 −1 spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-cors.xml
  55. +2 −2 ...rc/main/java/org/springframework/web/socket/adapter/standard/StandardWebSocketHandlerAdapter.java
  56. +10 −2 src/asciidoc/web-cors.adoc
  57. +1 −1 src/asciidoc/web-mvc.adoc
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=4.3.27.BUILD-SNAPSHOT
version=4.3.28.RELEASE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2020 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.
@@ -80,9 +80,8 @@ public class ReflectiveAspectJAdvisorFactory extends AbstractAspectJAdvisorFacto
new Converter<Method, Annotation>() {
@Override
public Annotation convert(Method method) {
AspectJAnnotation<?> annotation =
AbstractAspectJAdvisorFactory.findAspectJAnnotationOnMethod(method);
return (annotation != null ? annotation.getAnnotation() : null);
AspectJAnnotation<?> ann = AbstractAspectJAdvisorFactory.findAspectJAnnotationOnMethod(method);
return (ann != null ? ann.getAnnotation() : null);
}
}));
comparator.addComparator(new ConvertingComparator<Method, String>(
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2020 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.
@@ -136,14 +136,8 @@ private String getAspectName(Advisor anAdvisor) {
}

private int getAspectDeclarationOrder(Advisor anAdvisor) {
AspectJPrecedenceInformation precedenceInfo =
AspectJAopUtils.getAspectJPrecedenceInformationFor(anAdvisor);
if (precedenceInfo != null) {
return precedenceInfo.getDeclarationOrder();
}
else {
return 0;
}
AspectJPrecedenceInformation precedenceInfo = AspectJAopUtils.getAspectJPrecedenceInformationFor(anAdvisor);
return (precedenceInfo != null ? precedenceInfo.getDeclarationOrder() : 0);
}

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2020 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.
@@ -61,12 +61,12 @@ public class AopNamespaceHandler extends NamespaceHandlerSupport {
*/
@Override
public void init() {
// In 2.0 XSD as well as in 2.1 XSD.
// In 2.0 XSD as well as in 2.5+ XSDs
registerBeanDefinitionParser("config", new ConfigBeanDefinitionParser());
registerBeanDefinitionParser("aspectj-autoproxy", new AspectJAutoProxyBeanDefinitionParser());
registerBeanDefinitionDecorator("scoped-proxy", new ScopedProxyBeanDefinitionDecorator());

// Only in 2.0 XSD: moved to context namespace as of 2.1
// Only in 2.0 XSD: moved to context namespace in 2.5+
registerBeanDefinitionParser("spring-configured", new SpringConfiguredBeanDefinitionParser());
}

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2020 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.
@@ -67,6 +67,7 @@ import java.io.Serializable;
* @since 2.5.2
*/
public abstract aspect AbstractInterfaceDrivenDependencyInjectionAspect extends AbstractDependencyInjectionAspect {

/**
* Select initialization join point as object construction
*/
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2020 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.
@@ -32,8 +32,8 @@ import org.springframework.beans.factory.wiring.BeanConfigurerSupport;
* Concrete aspect that uses the {@link Configurable} annotation to identify
* which classes need autowiring.
*
* <p>The bean name to look up will be taken from the {@code &#64;Configurable}
* annotation if specified, otherwise the default bean name to look up will be
* <p>The bean name to look up will be taken from the {@code @Configurable}
* annotation if specified; otherwise, the default bean name to look up will be
* the fully qualified name of the class being configured.
*
* @author Rod Johnson
@@ -47,22 +47,26 @@ import org.springframework.beans.factory.wiring.BeanConfigurerSupport;
public aspect AnnotationBeanConfigurerAspect extends AbstractInterfaceDrivenDependencyInjectionAspect
implements BeanFactoryAware, InitializingBean, DisposableBean {

private BeanConfigurerSupport beanConfigurerSupport = new BeanConfigurerSupport();
private final BeanConfigurerSupport beanConfigurerSupport = new BeanConfigurerSupport();


@Override
public void setBeanFactory(BeanFactory beanFactory) {
this.beanConfigurerSupport.setBeanWiringInfoResolver(new AnnotationBeanWiringInfoResolver());
this.beanConfigurerSupport.setBeanFactory(beanFactory);
}

@Override
public void afterPropertiesSet() {
this.beanConfigurerSupport.afterPropertiesSet();
}

@Override
public void configureBean(Object bean) {
this.beanConfigurerSupport.configureBean(bean);
}

@Override
public void destroy() {
this.beanConfigurerSupport.destroy();
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2020 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.
@@ -43,9 +43,9 @@
* Internal class that caches JavaBeans {@link java.beans.PropertyDescriptor}
* information for a Java class. Not intended for direct use by application code.
*
* <p>Necessary for own caching of descriptors within the application's
* ClassLoader, rather than rely on the JDK's system-wide BeanInfo cache
* (in order to avoid leaks on ClassLoader shutdown).
* <p>Necessary for Spring's own caching of bean descriptors within the application
* {@link ClassLoader}, rather than relying on the JDK's system-wide {@link BeanInfo}
* cache (in order to avoid leaks on individual application shutdown in a shared JVM).
*
* <p>Information is cached statically, so we don't need to create new
* objects of this class for every JavaBean we manipulate. Hence, this class
@@ -97,7 +97,7 @@ public class CachedIntrospectionResults {
SpringProperties.getFlag(IGNORE_BEANINFO_PROPERTY_NAME);

/** Stores the BeanInfoFactory instances */
private static List<BeanInfoFactory> beanInfoFactories = SpringFactoriesLoader.loadFactories(
private static final List<BeanInfoFactory> beanInfoFactories = SpringFactoriesLoader.loadFactories(
BeanInfoFactory.class, CachedIntrospectionResults.class.getClassLoader());

private static final Log logger = LogFactory.getLog(CachedIntrospectionResults.class);
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2020 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.
@@ -41,12 +41,11 @@
* regular constructors: i.e. lookup methods cannot get replaced on beans returned
* from factory methods where we cannot dynamically provide a subclass for them.
*
* <p><b>Concrete limitations in typical Spring configuration scenarios:</b>
* When used with component scanning or any other mechanism that filters out abstract
* beans, provide stub implementations of your lookup methods to be able to declare
* them as concrete classes. And please remember that lookup methods won't work on
* beans returned from {@code @Bean} methods in configuration classes; you'll have
* to resort to {@code @Inject Provider&lt;TargetBean&gt;} or the like instead.
* <p><b>Recommendations for typical Spring configuration scenarios:</b>
* When a concrete class may be needed in certain scenarios, consider providing stub
* implementations of your lookup methods. And please remember that lookup methods
* won't work on beans returned from {@code @Bean} methods in configuration classes;
* you'll have to resort to {@code @Inject Provider<TargetBean>} or the like instead.
*
* @author Juergen Hoeller
* @since 4.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2020 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.
@@ -294,7 +294,7 @@ public <T> T createBean(Class<T> beanClass) throws BeansException {
public void autowireBean(Object existingBean) {
// Use non-singleton bean definition, to avoid registering bean as dependent bean.
RootBeanDefinition bd = new RootBeanDefinition(ClassUtils.getUserClass(existingBean));
bd.setScope(BeanDefinition.SCOPE_PROTOTYPE);
bd.setScope(SCOPE_PROTOTYPE);
bd.allowCaching = ClassUtils.isCacheSafe(bd.getBeanClass(), getBeanClassLoader());
BeanWrapper bw = new BeanWrapperImpl(existingBean);
initBeanWrapper(bw);
@@ -314,7 +314,7 @@ public Object configureBean(Object existingBean, String beanName) throws BeansEx
if (bd == null) {
bd = new RootBeanDefinition(mbd);
}
bd.setScope(BeanDefinition.SCOPE_PROTOTYPE);
bd.setScope(SCOPE_PROTOTYPE);
bd.allowCaching = ClassUtils.isCacheSafe(ClassUtils.getUserClass(existingBean), getBeanClassLoader());
}
BeanWrapper bw = new BeanWrapperImpl(existingBean);
@@ -337,15 +337,15 @@ public Object resolveDependency(DependencyDescriptor descriptor, String requesti
public Object createBean(Class<?> beanClass, int autowireMode, boolean dependencyCheck) throws BeansException {
// Use non-singleton bean definition, to avoid registering bean as dependent bean.
RootBeanDefinition bd = new RootBeanDefinition(beanClass, autowireMode, dependencyCheck);
bd.setScope(BeanDefinition.SCOPE_PROTOTYPE);
bd.setScope(SCOPE_PROTOTYPE);
return createBean(beanClass.getName(), bd, null);
}

@Override
public Object autowire(Class<?> beanClass, int autowireMode, boolean dependencyCheck) throws BeansException {
// Use non-singleton bean definition, to avoid registering bean as dependent bean.
final RootBeanDefinition bd = new RootBeanDefinition(beanClass, autowireMode, dependencyCheck);
bd.setScope(BeanDefinition.SCOPE_PROTOTYPE);
bd.setScope(SCOPE_PROTOTYPE);
if (bd.getResolvedAutowireMode() == AUTOWIRE_CONSTRUCTOR) {
return autowireConstructor(beanClass.getName(), bd, null, null).getWrappedInstance();
}
@@ -378,7 +378,7 @@ public void autowireBeanProperties(Object existingBean, int autowireMode, boolea
// Use non-singleton bean definition, to avoid registering bean as dependent bean.
RootBeanDefinition bd =
new RootBeanDefinition(ClassUtils.getUserClass(existingBean), autowireMode, dependencyCheck);
bd.setScope(BeanDefinition.SCOPE_PROTOTYPE);
bd.setScope(SCOPE_PROTOTYPE);
BeanWrapper bw = new BeanWrapperImpl(existingBean);
initBeanWrapper(bw);
populateBean(bd.getBeanClass().getName(), bd, bw);
@@ -584,7 +584,7 @@ else if (!this.allowRawInjectionDespiteWrapping && hasDependentBean(beanName)) {
"] in its raw version as part of a circular reference, but has eventually been " +
"wrapped. This means that said other beans do not use the final version of the " +
"bean. This is often the result of over-eager type matching - consider using " +
"'getBeanNamesOfType' with the 'allowEagerInit' flag turned off, for example.");
"'getBeanNamesForType' with the 'allowEagerInit' flag turned off, for example.");
}
}
}
Original file line number Diff line number Diff line change
@@ -809,16 +809,20 @@ public String getInitMethodName() {
}

/**
* Specify whether or not the configured init method is the default.
* <p>The default value is {@code false}.
* Specify whether or not the configured initializer method is the default.
* <p>The default value is {@code true} for a locally specified init method
* but switched to {@code false} for a shared setting in a defaults section
* (e.g. {@code bean init-method} versus {@code beans default-init-method}
* level in XML) which might not apply to all contained bean definitions.
* @see #setInitMethodName
* @see #applyDefaults
*/
public void setEnforceInitMethod(boolean enforceInitMethod) {
this.enforceInitMethod = enforceInitMethod;
}

/**
* Indicate whether the configured init method is the default.
* Indicate whether the configured initializer method is the default.
* @see #getInitMethodName()
*/
public boolean isEnforceInitMethod() {
@@ -842,16 +846,20 @@ public String getDestroyMethodName() {

/**
* Specify whether or not the configured destroy method is the default.
* <p>The default value is {@code false}.
* <p>The default value is {@code true} for a locally specified destroy method
* but switched to {@code false} for a shared setting in a defaults section
* (e.g. {@code bean destroy-method} versus {@code beans default-destroy-method}
* level in XML) which might not apply to all contained bean definitions.
* @see #setDestroyMethodName
* @see #applyDefaults
*/
public void setEnforceDestroyMethod(boolean enforceDestroyMethod) {
this.enforceDestroyMethod = enforceDestroyMethod;
}

/**
* Indicate whether the configured destroy method is the default.
* @see #getDestroyMethodName
* @see #getDestroyMethodName()
*/
public boolean isEnforceDestroyMethod() {
return this.enforceDestroyMethod;
Original file line number Diff line number Diff line change
@@ -879,7 +879,7 @@ public List<BeanPostProcessor> getBeanPostProcessors() {

/**
* Return whether this factory holds a InstantiationAwareBeanPostProcessor
* that will get applied to singleton beans on shutdown.
* that will get applied to singleton beans on creation.
* @see #addBeanPostProcessor
* @see org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessor
*/
@@ -1508,7 +1508,7 @@ protected boolean isFactoryBean(String beanName, RootBeanDefinition mbd) {
* should be used as fallback.
* @param beanName the name of the bean
* @param mbd the merged bean definition for the bean
* @return the type for the bean if determinable, or {@code null} else
* @return the type for the bean if determinable, or {@code null} otherwise
* @see org.springframework.beans.factory.FactoryBean#getObjectType()
* @see #getBean(String)
*/
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2020 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.
@@ -24,6 +24,7 @@
* @author Mark Fisher
* @author Juergen Hoeller
* @since 2.5
* @see AbstractBeanDefinition#applyDefaults
*/
public class BeanDefinitionDefaults {

@@ -42,6 +43,7 @@ public class BeanDefinitionDefaults {
* Set whether beans should be lazily initialized by default.
* <p>If {@code false}, the bean will get instantiated on startup by bean
* factories that perform eager initialization of singletons.
* @see AbstractBeanDefinition#setLazyInit
*/
public void setLazyInit(boolean lazyInit) {
this.lazyInit = lazyInit;
@@ -63,6 +65,7 @@ public boolean isLazyInit() {
* (however, there may still be explicit annotation-driven autowiring).
* @param autowireMode the autowire mode to set.
* Must be one of the constants defined in {@link AbstractBeanDefinition}.
* @see AbstractBeanDefinition#setAutowireMode
*/
public void setAutowireMode(int autowireMode) {
this.autowireMode = autowireMode;
@@ -79,6 +82,7 @@ public int getAutowireMode() {
* Set the dependency check code.
* @param dependencyCheck the code to set.
* Must be one of the constants defined in {@link AbstractBeanDefinition}.
* @see AbstractBeanDefinition#setDependencyCheck
*/
public void setDependencyCheck(int dependencyCheck) {
this.dependencyCheck = dependencyCheck;
@@ -93,6 +97,10 @@ public int getDependencyCheck() {

/**
* Set the name of the default initializer method.
* <p>Note that this method is not enforced on all affected bean definitions
* but rather taken as an optional callback, to be invoked if actually present.
* @see AbstractBeanDefinition#setInitMethodName
* @see AbstractBeanDefinition#setEnforceInitMethod
*/
public void setInitMethodName(String initMethodName) {
this.initMethodName = (StringUtils.hasText(initMethodName) ? initMethodName : null);
@@ -107,6 +115,10 @@ public String getInitMethodName() {

/**
* Set the name of the default destroy method.
* <p>Note that this method is not enforced on all affected bean definitions
* but rather taken as an optional callback, to be invoked if actually present.
* @see AbstractBeanDefinition#setDestroyMethodName
* @see AbstractBeanDefinition#setEnforceDestroyMethod
*/
public void setDestroyMethodName(String destroyMethodName) {
this.destroyMethodName = (StringUtils.hasText(destroyMethodName) ? destroyMethodName : null);
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2020 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.
@@ -35,6 +35,7 @@
* @author Juergen Hoeller
* @author Stephane Nicoll
* @since 4.3
* @see CaffeineCacheManager
*/
@UsesJava8
public class CaffeineCache extends AbstractValueAdaptingCache {
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2020 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.
@@ -92,7 +92,6 @@ public <T> T get(Object key, Callable<T> valueLoader) {
this.cache.releaseWriteLockOnKey(key);
}
}

}

private <T> T loadValue(Object key, Callable<T> valueLoader) {
Loading