Commit Graph

1328 Commits

Author SHA1 Message Date
Stephane Nicoll 3017955eff Update copyright year of changed file
See gh-28340
2022-04-14 14:09:54 +02:00
Koen Punt 22c82ff206 Fix method reference in Kotlin documentation
See gh-28340
2022-04-14 14:09:02 +02:00
Sam Brannen a7cf19cec5 Improve documentation and matching algorithm in data binders 2022-04-13 09:55:40 +02:00
Juergen Hoeller 949c3d450c Align plain accessor check 2022-04-13 00:24:06 +02:00
Juergen Hoeller 9f91168396 Restore ability to configure setClassLoader methods
Closes gh-28269
2022-04-08 13:02:53 +02:00
Brian Clozel 002546b3e4 Refine PropertyDescriptor filtering
Restrict property paths under `Class` and properties of types
`ClassLoader` or `ProtectionDomain`.
2022-03-31 10:21:30 +02:00
Sam Brannen 8fc744f4f4 Improve Javadoc for BeanExpressionResolver 2022-03-21 16:57:27 +01:00
Sam Brannen 64b64d9ba0 Stop referring to features as "Java 5" features
With a Java 8 baseline in place for quite some time now, it no longer
makes sense to refer to features such as annotations as "Java 5
annotations".

This commit also removes old `Tiger*Tests` classes, thereby avoiding
duplicate execution of various tests.
2022-03-18 16:32:30 +01:00
danthonywalker 50771237cc Fix ListableBeanFactory#findAnnotationOnBean extension return type
Closes gh-26908
2022-03-15 18:33:35 +01:00
Sam Brannen 9fbf5dc945 Use String#lastIndexOf(int) where possible 2022-03-15 17:03:20 +01:00
Sam Brannen 6e2e45d18f Apply @SafeVarargs to ManagedMap.ofEntries(...) 2022-03-14 20:24:57 +01:00
Sam Brannen 887389d341 Clarify behavior for generics support in BeanUtils.copyProperties()
Since Spring Framework 5.3, BeanUtils.copyProperties() honors generics
in the source and target property types (see gh-24187); however, this
refinement of the contract was not properly documented prior to this
commit. In addition, the refinement can be a breaking change for users
who were relying on the previous unreliable behavior.

This commit therefore clarifies the behavior for generics support in
BeanUtils.copyProperties() and introduces a table of example matches
and mismatches when generics are involved.

Closes gh-27259
2022-03-12 18:12:23 +01:00
Sam Brannen d67034f99b Document semantics for externally managed init/destroy methods
This commit introduces Javadoc to explain the difference between
init/destroy method names when such methods are private, namely that a
private method is registered via its qualified method name; whereas, a
non-private method is registered via its simple name.

See gh-28083
2022-03-01 16:18:46 +01:00
Sam Brannen f96872404d Ensure private init/destroy method is invoked only once
Closes gh-28083
2022-03-01 15:03:10 +01:00
Sam Brannen a7d5fbfbea Fix log messages for init/destroy method registration 2022-03-01 15:03:10 +01:00
Stephane Nicoll d2c7dfb79e Add convenience factory method for Managed[List|Set|Map]
Closes gh-28026
2022-02-10 12:37:19 +01:00
Sam Brannen 669b05dc1d Allow AutowiredAnnotationBeanPostProcessor to compile on JDK 11 2022-02-08 14:06:27 +01:00
Juergen Hoeller bc9cd9a687 Find interface method even for late-bound interface declaration in subclass
Closes gh-27995
2022-02-04 23:21:27 +01:00
Sam Brannen f8a5a8d7be Use modern language features in tests 2022-02-03 14:50:10 +01:00
Sam Brannen df263d01b9 Use idiomatic AssertJ assertions for true, false, and null 2022-01-10 14:15:55 +01:00
Sam Brannen f04e9a8366 Deprecate getBeanFactory() method in AbstractBeanDefinitionReader
The getBeanFactory() method has been obsolete for more than 13 years
since it was superseded by the getRegistry() method in the
BeanDefinitionReader interface.

Closes gh-27875
2022-01-04 12:45:11 +01:00
Sam Brannen c1606c5a5e Polishing 2022-01-04 12:39:28 +01:00
Juergen Hoeller ca84559588 Provide findAnnotationOnBean variant with allowFactoryBeanInit flag
Closes gh-27796
2021-12-14 16:47:12 +01:00
Juergen Hoeller 14f24f43d7 Polishing 2021-12-03 22:36:31 +01:00
Juergen Hoeller d7e0eed8d2 Clarify getBeanProvider(ResolvableType) semantics for unresolved generics
Closes gh-27727
2021-12-03 22:33:50 +01:00
Juergen Hoeller b167e1a93f Remove unnecessary final declarations (for consistency) 2021-11-09 22:35:24 +01:00
Сергей Цыпанов e5475d698a Iterate over Map's entrySet() instead of keySet() in PropertyEditorRegistrySupport
Closes gh-27591
2021-10-22 14:15:33 +02:00
Juergen Hoeller eda3ca5fbc Remove unnecessary final declarations at method level 2021-10-12 15:17:44 +02:00
Sam Brannen 41ae9632d1 Upgrade to Checkstyle 9.0 and spring-javaformat 0.0.29
This commit upgrades the Gradle build to use Checkstyle 9.0 and
spring-javaformat 0.0.29 (which internally uses Checkstyle 8.45.1).

Closes gh-27520
2021-10-06 12:11:19 +02:00
Sam Brannen 48a507a993 Clean up warnings 2021-10-05 14:35:32 +02:00
Juergen Hoeller f632165dec Invoke bean-derived (Auto)Closeable.close() method directly
Closes gh-27504
2021-10-01 13:26:25 +02:00
Sam Brannen 96e4d3a530 Fail Gradle build for Javadoc warnings
In order to catch Javadoc errors in the build, we now enable the
`Xwerror` flag for the `javadoc` tool. In addition, we now use
`Xdoclint:syntax` instead of `Xdoclint:none` in order to validate
syntax within our Javadoc.

This commit fixes all resulting Javadoc errors and warnings.

This commit also upgrades to Undertow 2.2.12.Final and fixes the
artifact names for exclusions for the Servlet and annotations APIs.

The incorrect exclusion of the Servlet API resulted in the Servlet API
being on the classpath twice for the javadoc task, which resulted in the
following warnings in previous builds.

javadoc: warning - Multiple sources of package comments found for package "javax.servlet"
javadoc: warning - Multiple sources of package comments found for package "javax.servlet.http"
javadoc: warning - Multiple sources of package comments found for package "javax.servlet.descriptor"
javadoc: warning - Multiple sources of package comments found for package "javax.servlet.annotation"

Closes gh-27480
2021-09-29 14:02:37 +02:00
Sam Brannen bfdc99ab79 Fix Javadoc errors
See gh-27480
2021-09-28 11:44:12 +02:00
Sam Brannen 2567b20949 Upgrade to spring-javaformat 0.0.28 and downgrade to Checkstyle 8.41
In order to be able to use text blocks and other new Java language
features, we are upgrading to a recent version of Checkstyle.

The latest version of spring-javaformat-checkstyle (0.0.28) is built
against Checkstyle 8.32 which does not include support for language
features such as text blocks. Support for text blocks was added in
Checkstyle 8.36.

In addition, there is a binary compatibility issue between
spring-javaformat-checkstyle 0.0.28 and Checkstyle 8.42. Thus we cannot
use Checkstyle 8.42 or higher.

In this commit, we therefore upgrade to spring-javaformat-checkstyle
0.0.28 and downgrade to Checkstyle 8.41.

This change is being applied to `5.3.x` as well as `main` in order to
benefit from the enhanced checking provided in more recent versions of
Checkstyle.

Closes gh-27481
2021-09-28 10:29:31 +02:00
Juergen Hoeller 211f0bbf88 Fix invalid characters in source files
Closes gh-27475
2021-09-27 16:57:54 +02:00
Juergen Hoeller 9ff0d717f2 Restore lenient fallback in case of several non-public constructors
See gh-27437
2021-09-27 16:52:11 +02:00
Juergen Hoeller 58898de542 Provide accessors for externallyManagedConfigMembers and Init/DestroyMethods
Closes gh-27449
2021-09-23 15:54:40 +02:00
Juergen Hoeller f9d63e7bb1 BeanUtils.getResolvableConstructor falls back to single non-public constructor
Closes gh-27437
2021-09-23 15:53:54 +02:00
Sam Brannen f07e6a1b9d Support char primitive default values in BeanUtils.instantiateClass()
Closes gh-27390
2021-09-14 16:12:21 +02:00
Sam Brannen 5cc09849ce Introduce test for gh-27390 2021-09-14 16:05:41 +02:00
takeaction21 92cd680a2c Support float and double primitive default values in BeanUtils.instantiateClass()
See gh-27390
2021-09-14 16:05:41 +02:00
Juergen Hoeller 6c17e9375b Reduce log statement for non-unique JavaBean property to debug level
Closes gh-27372
2021-09-13 18:13:41 +02:00
Brian Clozel cecc0849a8 Upgrade to Gradle 7.2
This commit upgrades Gradle to 7.2.
Gradle configuration names are updated accordingly.
This also upgrades Gradle build plugins.

See gh-26870
2021-09-13 09:37:35 +02:00
Juergen Hoeller b2eaa7c1c3 Polishing 2021-09-02 22:59:33 +02:00
Juergen Hoeller b6c2c11805 Polishing 2021-09-02 22:21:27 +02:00
Sam Brannen 6177f00a63 Polish PropertyAccessor tests 2021-08-18 17:10:40 +02:00
Juergen Hoeller 44951873f9 Introduce accessors for allowCircularReferences/allowRawInjectionDespiteWrapping
Closes gh-27289
2021-08-17 17:19:21 +02:00
Stephane Nicoll 31b651a114 Polish contribution
See gh-27248
2021-08-08 11:33:26 +02:00
Syuziko eaf9deedfd Polish tests
See gh-27248
2021-08-07 18:53:47 +02:00
Stephane Nicoll a90ed957be Support ResolvableType in BeanDefinitionBuilder
Closes gh-27160
2021-07-12 14:07:25 +02:00