Commit Graph

1861 Commits

Author SHA1 Message Date
Sam Brannen 8a371c7669 Use Gradle test fixture support for spring-aop
See gh-23550
2020-01-02 16:01:35 +01:00
Sam Brannen 57b771ba92 Move common FactoryMethods to spring-beans test fixtures
See gh-23550
2020-01-02 16:01:35 +01:00
Sam Brannen 726b1bb1d0 Rename test fixture package in spring-context
See gh-23550
2020-01-02 16:01:35 +01:00
Sam Brannen 7cd4ddf5fc Rename test fixture package in spring-beans
See gh-23550
2020-01-02 16:01:35 +01:00
Sam Brannen 4260c34b47 Rename test fixture package in spring-core
See gh-23550
2020-01-02 16:01:34 +01:00
Sam Brannen 61d4ee594d Use Gradle test fixture support for spring-beans and spring-context
See gh-23550
2020-01-02 16:01:34 +01:00
Sam Brannen 5718bf424b Use Gradle test fixture support for spring-core
See gh-23550
2020-01-02 16:01:34 +01:00
Juergen Hoeller 7474ee7041 Polishing 2019-12-16 16:50:30 +01:00
Sam Brannen 47b18e5ea9 Polishing 2019-12-13 16:12:39 +01:00
lixiaolong11000 bee2b7cd73 Add missing test cases in XmlBeanFactoryTests
Closes gh-24189
2019-12-13 15:56:06 +01:00
Johnny Lim 1e83e889aa Use hasSize() where possible
See gh-24172
2019-12-10 07:58:53 +01:00
Sam Brannen 093323beeb Introduce Checkstyle rule to prohibit class names ending with "Test" 2019-11-29 17:30:29 +01:00
Sam Brannen 59e250c93c Consistent use of SCOPE_PROTOTYPE and SCOPE_SINGLETON constants
Closes gh-19905
2019-11-24 13:49:43 +01:00
Sébastien Deleuze 6c7250b0ae Make Kotlin DSL class constructors internal
Closes gh-24059
2019-11-22 16:10:42 +01:00
Sam Brannen fd6efb9a65 Polishing 2019-11-19 15:53:20 +01:00
Sam Brannen 8df3afd0b6 Polish contribution
See gh-23895
2019-11-14 13:26:38 +01:00
Sam Brannen 8186b77b58 Polish contribution
See gh-23895
2019-11-14 09:59:42 +01:00
monosoul a0e4ac39bf Inverse condition to fix ISO-formatted Instant parsing
Prior to this commit, InstantFormatter was able to properly serialize
an Instant that is far in the future (or in the past), but it could not
properly deserialize it, because in such scenarios an ISO-formatted
Instant starts with a +/- sign.

This commit fixes this issue, while maintaining the previous contract,
and also introduces tests for InstantFormatter.

Closes gh-23895
2019-11-14 09:59:42 +01:00
Juergen Hoeller 3dc5e7b1d5 Avoid String concatenation for lookup in StaticMessageSource
Closes gh-22451
2019-11-13 23:41:26 +01:00
Juergen Hoeller 22211a01ce Polishing 2019-11-13 17:23:23 +01:00
stsypanov f2b3953d76 Use array.clone() instead of manual array creation 2019-11-13 13:53:42 +01:00
Juergen Hoeller f61d728db9 Fallback Locale other than the system Locale through setDefaultLocale
Closes gh-23977
2019-11-13 13:48:08 +01:00
Juergen Hoeller c4ec6aea68 Fix Checkstyle violations
See gh-23784
2019-11-11 17:18:52 +01:00
Steven Schlansker fc55e66d50 ApplicationListenerMethodAdapter: gracefully handle beans which are actually NullBean
Currently, if you have an optional event listener (via a @Bean method returning `null`)
this causes the event multicaster to explode violently.  Now, we just safely skip it.
2019-11-11 15:43:29 +01:00
GungnirLaevatain d494621ee3 avoid store all bean name 2019-11-11 15:43:05 +01:00
Sam Brannen 64dfa462a6 Fix Javadoc for SmartLifecycle.DEFAULT_PHASE regarding ordering
Closes gh-23956
2019-11-09 18:03:07 +01:00
stsypanov f5ae3c77c6 Use Method::getParameterCount where possible 2019-11-07 18:00:15 +01:00
Sam Brannen d6002092c4 Clean up build warnings for ApplicationContextExpressionTests 2019-11-04 15:44:53 +01:00
Sam Brannen 74b7b550f6 Make MBeanServer tests more robust
This commit refactors several tests to use SocketUtils to find an
available port, compose a custom JMX service URL using that port, and
start an MBeanServer for the particular test using that port.

This commit also makes other changes to MBeanServer related tests in an
effort to make them more robust when executed concurrently.

Closes gh-23699
2019-10-31 14:34:57 +01:00
Sam Brannen 57b4b74e7d Polish Javadoc for JMX factory beans 2019-10-31 13:55:13 +01:00
Sam Brannen 9f00eb68e9 Clean up warnings 2019-10-30 19:14:58 +01:00
Christoph Dreis 3c17178b16 Fix Mockito deprecations 2019-10-30 18:30:05 +01:00
Brian Clozel 4beb25b318 Reorder date formatting converter in registrar
Prior to this commit, the `DateFormatterRegistrar` would register the
annotation-based formatter before the pattern-based formatter. This
would create an issue when an application tries to convert a `String` to
an annotated `@DateTimeFormat Date`: since the converters are considered
in reversed order of registration in
`GenericConversionServicei#ConvertersForPair`, the pattern-based variant
would always be considered before the annotation-based variant,
overriding the developer's opinion.

This commit aligns the `DateFormatterRegistrar` with the
`DateTimeFormatterRegistrar` and registers the annotation-based variant
last.

Closes gh-23893
2019-10-30 17:15:59 +01:00
Juergen Hoeller 19ff7d84ab Polishing 2019-10-30 14:31:46 +01:00
Sam Brannen 4dc966b04b Include @Inject TCK tests in the build again
Commit 979508a7f3 removed the JUnit 4
dependency from all modules except spring-test. Unfortunately, the
@Inject TCK tests (SpringAtInjectTckTests) are still based on JUnit 3.
Thus, that commit accidentally excluded those tests from the build.

This commit includes SpringAtInjectTckTests in the build again by
introducing a test runtime dependency on the JUnit Vintage TestEngine
in spring-context.

See gh-23451
2019-09-27 13:57:31 +02:00
Juergen Hoeller 2861fc65bd Polishing 2019-09-27 10:17:56 +02:00
Sam Brannen 6a207d0012 Polish AnnotationConfigApplicationContextTests 2019-09-26 16:45:49 +02:00
Johnny Lim 2a4dbcc623 Fix an assertion in AnnotationConfigApplicationContextTests
Closes gh-23719
2019-09-26 16:34:27 +02:00
Sam Brannen f05b4625de Merge branch '5.1.x' 2019-09-26 10:55:55 +02:00
Sam Brannen 7d126d3288 Improve documentation regarding "annotated classes"
See gh-23638
2019-09-26 10:26:36 +02:00
Juergen Hoeller 3616e96792 Upgrade to SLF4J 1.7.28, Groovy 2.5.8, RxJava 2.2.12, Joda-Time 2.10.4, Rome 1.12.2, OkHttp 3.14.3, Apache HttpClient 4.5.10, Apache Johnzon 1.1.13 2019-09-25 22:27:41 +02:00
Juergen Hoeller 1aa0ea0281 Fix nullability declarations on internal ParserStrategyUtils methods 2019-09-25 13:51:20 +02:00
Juergen Hoeller bd70f10d2b Merge branch '5.1.x'
# Conflicts:
#	build.gradle
#	spring-aop/src/main/java/org/springframework/aop/framework/CglibAopProxy.java
#	spring-aspects/spring-aspects.gradle
#	spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java
#	spring-beans/src/main/java/org/springframework/beans/factory/support/GenericBeanDefinition.java
#	spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java
#	spring-orm/spring-orm.gradle
#	spring-test/spring-test.gradle
2019-09-25 12:43:24 +02:00
Juergen Hoeller 0519a2ff3c Exclude jdk package in ShadowingClassLoader (JDK 11 compatibility)
Closes gh-23641
2019-09-25 12:11:33 +02:00
Juergen Hoeller 6a08bfdff7 Avoid unnecessary synchronization for non-existent missing caches
Closes gh-23635
2019-09-25 12:10:23 +02:00
Sam Brannen b9013ada9f Abort MBeanServer tests if BindException encountered
This commit builds on the previous commit but covers exceptions thrown
by @BeforeEach and @AfterEach methods as well as @Test methods.
2019-09-24 19:20:39 +02:00
Sam Brannen 435cc67026 Abort MBeanServer tests if BindException encountered 2019-09-24 18:57:30 +02:00
Juergen Hoeller e68132686d Restore lenient target type handling for FactoryBean definitions
Closes gh-23561
2019-09-20 21:54:32 +02:00
Sam Brannen 3603e0c448 Set Spring-specific name for shutdown hook thread
Prior to this commit, the name of the Thread registered via
ConfigurableApplicationContext#registerShutdownHook() was the generic,
default thread name ("Thread-#"). That made it difficult to discern
which executing thread was the Spring ApplicationContext shutdown hook.

This commit improves diagnostics by setting the thread name of the
ApplicationContext shutdown hook to "SpringContextShutdownHook".

Closes gh-23670
2019-09-20 13:16:59 +02:00
Sam Brannen a676059699 Declare CRON_DISABLED constant value only once
This commit removes the duplicated CRON_DISABLED constant value from
@Scheuled and simply refers to the ScheduledTaskRegistrar.CRON_DISABLED
constant.

This avoids a potential package cycle by ensuring that the `annotation`
package depends on the `config` package but not the other way around.

See gh-23568
2019-09-16 15:17:58 +02:00