Commit Graph

1011 Commits

Author SHA1 Message Date
Juergen Hoeller
8ea3aa512f Merge branch '5.1.x' 2019-07-20 16:35:05 +02:00
Juergen Hoeller
4a09b323b6 Apply getInterfaceMethodIfPossible without SecurityManager as well
Closes gh-23323
2019-07-20 16:11:17 +02:00
Juergen Hoeller
daf29118a6 Resolve ApplicationListener against BeanDefinition.getResolvableType()
This covers ApplicationListener generics in factory method return types in particular but also allows for programmatic setTargetType hints.

Closes gh-23178
2019-07-20 15:05:38 +02:00
Sam Brannen
9110a56e11 Merge branch '5.1.x' 2019-07-20 13:33:43 +02:00
zheng.ren01@mljr.com
f92b60c08f Only invoke getInterfaceMethodIfPossible() when security manager is used
Prior to this commit, AbstractAutowireCapableBeanFactory's
invokeCustomInitMethod() method invoked
ClassUtils.getInterfaceMethodIfPossible() even if the security manager
was not being used.

This commit ensures that getInterfaceMethodIfPossible() is only invoked
if the security manager is used.

Closes gh-23323
2019-07-20 13:30:57 +02:00
Sebastien Deleuze
095fd5bcb3 Use Kotlin BOM
Close gh-23316
2019-07-19 10:43:54 +02:00
Sam Brannen
b774147db4 Polish Javadoc for @Autowired
See gh-23263
2019-07-18 12:07:39 +02:00
Sam Brannen
817f689584 Improve Javadoc for AutowiredAnnotationBeanPostProcessor
See gh-23263
2019-07-18 11:55:18 +02:00
Sam Brannen
56eadff34f Merge branch '5.1.x' 2019-07-17 18:58:08 +02:00
Sam Brannen
74ddf1bee5 Improve documentation for @Autowired constructors
Prior to this commit, there was some ambiguity surrounding semantics
for @Autowired constructors and `required = true`, especially for
multiple @Autowired constructors.

This commit improves the documentation in the Javadoc for @Autowired as
well as in the reference manual.

Closes gh-23263
2019-07-17 18:55:58 +02:00
Rob Winch
8c605dd082 BeanDefinitionParserDelegate uses http://www.springframework.org/schema/
See gh-22839
2019-07-11 18:14:20 +02:00
Сергей Цыпанов
1728bf17fc Avoid unnecessary boxing where primitives can be used
Closes gh-23267
2019-07-10 16:51:18 +02:00
Sam Brannen
b8f77e53b5 Polish contribution
See gh-23251
2019-07-10 15:52:41 +02:00
Eric Hettiaratchi
827ec5d5a2 Add unit tests for PropertyAccessorUtils
Closes gh-23251
2019-07-10 15:40:21 +02:00
Sam Brannen
140e1e6532 Polish PropertyAccessorUtilsTests 2019-07-09 17:39:32 +02:00
Sam Brannen
fae75cb238 Polish contribution
See gh-23237
2019-07-07 16:29:03 +02:00
Сергей Цыпанов
9f81ffa5ae Use StringJoiner where possible to simplify String joining
Closes gh-23237
2019-07-07 16:19:01 +02:00
Juergen Hoeller
a5cb8799fa Merge branch '5.1.x' 2019-07-05 18:22:02 +02:00
Juergen Hoeller
56cc0d02e9 Bean destruction exceptions consistently logged at warn level
Closes gh-23200
2019-07-05 17:07:22 +02:00
Johnny Lim
77aa17fe75 Polish YamlProcessorTests.flattenedMapIsSameAsPropertiesButOrdered()
See gh-23158
2019-06-20 08:34:44 +02:00
Juergen Hoeller
0a77477d32 Merge branch '5.1.x' 2019-06-12 18:16:30 +02:00
Juergen Hoeller
fc46abf0b7 Polishing 2019-06-12 18:04:06 +02:00
stsypanov
49873a30c5 Simplify String concatenation 2019-06-12 17:32:35 +02:00
Juergen Hoeller
33b5bc2aae Polishing 2019-06-11 23:50:29 +02:00
Juergen Hoeller
a89bfffd8c Merge branch '5.1.x' 2019-06-11 23:16:03 +02:00
Juergen Hoeller
7dc92aa05d Polishing 2019-06-11 20:57:27 +02:00
Juergen Hoeller
fd159ad082 Custom init/destroy methods get invoked through interface is possible
Closes gh-22939
2019-06-11 20:56:30 +02:00
Juergen Hoeller
859923b732 Support for fine-grained by-type references and autowired properties
Closes gh-23032
2019-06-11 18:27:46 +02:00
Juergen Hoeller
662541a48e Fix formatting
See gh-23068
2019-06-08 14:26:39 +02:00
陈其苗
ab8e388412 Fix duplicate invoke method of transformedBeanName 2019-06-07 22:48:19 +02:00
Sebastien Deleuze
098ac0bbb8 Annotate Object#equals parameter with @Nullable
Closes gh-23093
2019-06-06 14:18:30 +02:00
Sam Brannen
e92ace7301 Merge branch '5.1.x' 2019-06-04 16:22:08 +03:00
Sam Brannen
6eac141160 Restore non-null check for requiredType in BeanFactory methods
Beginning with Spring Framework 5.0, non-null checks for the
requiredType in the following methods were inadvertently removed with
the internal switch to ResolvableType.forRawClass(requiredType).

- BeanFactory.getBean(Class<T>, Object...)
- BeanFactory.getBeanProvider(Class<T>)
- AutowireCapableBeanFactory.resolveNamedBean(Class<T>)

This commit restores those non-null checks.

Closes gh-23045
2019-06-04 16:00:01 +03:00
Sam Brannen
410f204168 Support consistent ordering of string adapting properties
This commit introduces support for consistent ordering of Properties
created by CollectionFactory.createStringAdaptingProperties().

Specifically, the created Properties instance sorts properties
alphanumerically based on their keys.

Closes gh-23081
2019-06-04 14:47:43 +03:00
Sam Brannen
7c9c8220d8 Polish YAML tests 2019-05-28 15:27:11 +02:00
Phillip Webb
9d74da006c Migrate JUnit 4 assertions to AssertJ
Migrate all existing JUnit 4 `assert...` based assertions to AssertJ
and add a checkstyle rule to ensure they don't return.

See gh-23022
2019-05-23 15:52:49 -07:00
Phillip Webb
95a9d46a87 Migrate Hamcrest assertions to AssertJ
Migrate all existing `assertThat(..., Matcher)` assertions to AssertJ
and add checkstyle rules to ensure they don't return.

See gh-23022
2019-05-23 15:49:59 -07:00
Juergen Hoeller
75d751d968 Polishing 2019-05-20 22:19:11 +02:00
stsypanov
6f07a504b8 A couple of trivial simplifications 2019-05-20 21:41:15 +02:00
Phillip Webb
02850f357f Migrate exception checking tests to use AssertJ
Migrate tests that use `@Test(expectedException=...)` or
`try...fail...catch` to use AssertJ's `assertThatException`
instead.
2019-05-20 10:47:53 -07:00
Juergen Hoeller
a363fed209 Merge branch '5.1.x' 2019-05-20 17:21:07 +02:00
Juergen Hoeller
7edf8aca8e Drop DefaultNamespaceHandlerResolverTests.testResolveInvalidHandler
Closes gh-22994
2019-05-20 17:19:18 +02:00
Juergen Hoeller
9755b59197 Merge branch '5.1.x' 2019-05-13 18:05:07 +02:00
Juergen Hoeller
4af94dfc5d Clarify AbstractBeanDefinition.getBeanClass() return semantics
Closes gh-22960
2019-05-13 18:03:12 +02:00
Sam Brannen
deecab6311 Use assertThat from Hamcrest instead of JUnit 4
org.junit.Assert.assertThat() is deprecated as of JUnit 4.13.

See gh-22894
2019-05-12 14:46:55 +02:00
Sam Brannen
9e1ed6c771 Fix build on JDK 9+ 2019-05-12 13:46:14 +02:00
Sam Brannen
6ef7d7124e Clean up warnings 2019-05-11 15:51:06 +02:00
Phillip Webb
798b51f4a3 Migrate to BDD Mockito
Migrate all tests to consistently use BDD Mockito. Also add
checksyle rule to enforce going forwards.
2019-05-08 13:46:13 -07:00
Phillip Webb
816bbee8de Remove '.*' imports from tests
Organize test imports to expand all '.*' static imports into
fully qualified imports.

This update will allow us to use additional checkstyle rules in
the future, and will also help if we migrate fully to AssertJ.
2019-05-08 09:55:09 -07:00
Phil Webb
d7320de871 Migrate away from ExpectedException (#22922)
* Add limited checkstyles to test code

Add a limited set of checkstyle rules to the test codebase to improve
code consistency.

* Fix checksyle violations in test code

* Organize imports to fix checkstyle for test code

* Migrate to assertThatExceptionOfType

Migrate aware from ExpectedException rules to AssertJ exception
assertions. Also include a checkstyle rules to ensure that the
the ExpectedException is not accidentally used in the future.

See gh-22894
2019-05-08 16:25:52 +02:00