Commit Graph

124 Commits

Author SHA1 Message Date
Stéphane Nicoll c5f8dcc245 Merge branch '6.1.x' 2024-11-06 23:12:06 +09:00
Stéphane Nicoll 0219ee656f Polish "Prefer modified resources over the originals in TestCompiler"
See gh-33850
2024-11-06 23:03:11 +09:00
Andy Wilkinson f6e1a5de09 Prefer modified resources over the originals in TestCompiler
Previously, when the test compiler had been seeded with a resource
file, any modifications to this resource performed during
compilation would be lost as this original content would always
be returned.

This commit updates the DynamicJavaFileManager to always store
the dynamic resource in the dynamicResourceFiles map, irrespective
of whether it's being created afresh or from some existing resource
content. This ensures that any modifications made to the resource
can be retrieved later on.

Similarly, DynamicClassLoader has been updated to prefer dynamic
resource files over any original resource files. This ensures that
the resource that it finds reflects any modifications that have
been made to it.

See gh-33850
2024-11-06 23:00:08 +09:00
Juergen Hoeller e89218b39a Merge branch '6.1.x' 2024-10-16 13:46:22 +02:00
Juergen Hoeller 11d4272ff4 Use Locale.ROOT consistently for toLower/toUpperCase
Closes gh-33708
2024-10-16 13:36:23 +02:00
Stéphane Nicoll a77895bd90 Merge branch '6.1.x' 2024-04-23 15:34:49 +02:00
Stéphane Nicoll 95ac0eae4a Update copyright year of changed files
See gh-32696
2024-04-23 15:32:59 +02:00
Johnny Lim cc73ccefef Polish
See gh-32696
2024-04-23 15:31:48 +02:00
Sébastien Deleuze 5b660da52d Perform NullAway build-time checks in more modules
This commit enables null-safety build-time checks in:
 - spring-jdbc
 - spring-r2dbc
 - spring-orm
 - spring-beans
 - spring-aop

See gh-32475
2024-03-26 09:59:30 +01:00
Sébastien Deleuze aa0fb97ba5 Nullability refinements
See gh-32475
2024-03-19 13:32:13 +01:00
Stéphane Nicoll 06a39f166e Consistent handling of AssertProvider implementations 2024-02-20 10:19:19 +01:00
Stéphane Nicoll 0c42965fc3 Polish 2024-01-15 11:17:19 +01:00
Juergen Hoeller 07097976ef Polishing 2024-01-05 10:08:57 +01:00
Stefano Cordio be9ee9112c Upgrade to AssertJ 3.25.1, use AssertJ BOM
Closes gh-31945
2024-01-04 09:55:12 +01:00
Sam Brannen ffddbb586e Upgrade to AssertJ 3.25.0 2024-01-02 16:45:04 +01:00
Stéphane Nicoll 212346a86d Polish 2023-12-19 19:48:42 +01:00
Sam Brannen c0683cd30b Update copyright headers 2023-12-12 14:51:03 +01:00
Stéphane Nicoll 33e4129155 Do not discover annotation processors from the classpath in tests
Previously, if an annotation processors was present in the classpath
it was executed as part of tests using `TestCompiler`.

This commit updates `TestCompiler` to always set the annotation
processors to use. By default, this sets an empty list which does not
use annotation processing.

Closes gh-31791
2023-12-08 14:11:38 +01:00
Yanming Zhou afcd03bddc Replace assertThat(x.isEmpty()).isTrue() with assertThat(x).isEmpty()
Search for   : assertThat\((.+).isEmpty\(\)\).isTrue\(\)
Replace with : assertThat($1).isEmpty()

Search for   : assertThat\((.+).isEmpty\(\)\).isFalse\(\)
Replace with : assertThat($1).isNotEmpty()

Closes gh-31758
2023-12-06 10:04:56 +01:00
Yanming Zhou 59815cefce Replace assertThat(x.get(i)). with assertThat(x).element(i).
Search for   : assertThat\((.+)\.get\((\d+)\)\)\.
Replace with : assertThat($1).element($2).

Closes gh-31759
2023-12-06 09:43:59 +01:00
Stéphane Nicoll 1d38d649fa Relax test that used to rely on localized message
This reverts commit 93206c3f6e and updates
the related test to only rely on the fact the compiler fails. Relying
on a message will not work and the status code can be implementation
independent according to its javadoc.

Closes gh-31536
2023-11-01 16:33:44 +01:00
Johnny Lim 64e9fcad53 Apply SingleSpaceSeparator Checkstyle module
This commit also fixes its violations.

Closes gh-31469
2023-10-22 14:09:57 +02:00
Sam Brannen 37e6fe5b64 Update copyright headers 2023-10-22 11:28:40 +02:00
Johnny Lim 919faa2ce2 Order modifiers to align with JLS
This commit also applies Checkstyle ModifierOrder to enforce it.

See gh-31368
2023-10-17 16:13:56 +02:00
Stéphane Nicoll dc0d6a41d6 Polish 2023-10-11 09:00:40 +02:00
Stéphane Nicoll 93206c3f6e Add support for custom locale to render compiler messages
Closes gh-31408
2023-10-11 09:00:40 +02:00
Stéphane Nicoll 4b14a0b42c Add support for specifying compiler options
This commit is a prerequisite to help suppressing deprecating warnings
by allowing tests to validate that the compiler does not encounter them.

See gh-29597
2023-10-10 20:08:04 +02:00
Sam Brannen b05e46d502 Update copyright headers 2023-09-16 15:23:10 +02:00
Brian Clozel 7ecbdc19a5 Merge branch '6.0.x' 2023-09-15 17:54:06 +02:00
Brian Clozel 227049824c Fix RuntimeHintsPredicates matching rules
Prior to this commit, the `RuntimeHintsPredicates` would assume that
registering introspection or invocation hints for "all declared methods"
on a type would also include "all public methods". This is not true, as
the Java reflection API itself behaves differently.
`getDeclaredMethods()` does not return a superset of `getMethods()`, as
the latter can return inherited methods, but not the former.
Same reasoning applies to fields.

This commit fixes the hints predicates to only match if the correct hint
has been registered.

Fixes gh-31224
2023-09-15 17:50:53 +02:00
Stephane Nicoll 2b76c4d847 Polish "Wrap ternary operator within parentheses"
See gh-31076
2023-08-22 15:40:16 +02:00
Juergen Hoeller 4e863c5a75 Merge branch '6.0.x' 2023-08-04 02:40:17 +02:00
Juergen Hoeller 18966d048c Consistent equals/hashCode style (and related polishing) 2023-08-04 02:39:31 +02:00
Juergen Hoeller d250a5155a Consistent dependency declarations 2023-08-02 00:56:50 +02:00
Juergen Hoeller 3b1af692cc Merge branch '6.0.x'
# Conflicts:
#	spring-beans/spring-beans.gradle
#	spring-context/spring-context.gradle
#	spring-orm/spring-orm.gradle
#	spring-test/spring-test.gradle
#	spring-web/spring-web.gradle
#	spring-webflux/spring-webflux.gradle
2023-08-02 01:04:31 +02:00
Juergen Hoeller 4db724984e Suppress deprecations for compiling on JDK 19/20 2023-05-03 10:17:12 +02:00
Sam Brannen e17f5c50a8 Update copyright headers 2023-03-13 21:53:40 +01:00
Sam Brannen 00be19c647 Consistently declare Object::equals argument as @Nullable 2023-03-13 21:43:21 +01:00
Sam Brannen 74f6725a37 Update copyright headers 2023-03-06 13:56:33 +01:00
Sam Brannen 95481018d0 Apply "instanceof pattern matching" in spring-core-test
See gh-30067
2023-03-05 19:37:59 +01:00
Sam Brannen 56523d5014 Polishing 2023-03-05 19:37:11 +01:00
Sam Brannen 69f47e7700 Polishing
- primarily automated "clean up" using Eclipse IDE
2022-12-09 00:56:00 -05:00
Sam Brannen a88dbbec98 Apply project formatting rules for ternary operator
Discovered via RegEx: ^\s+\?
2022-11-29 17:51:13 +01:00
Sam Brannen 7fcd1de8e3 Use AssertJ's isEmpty() instead of hasSize(0)
Achieved via global search-and-replace.
2022-11-22 17:11:50 +01:00
Sam Brannen abf3400c07 Use Assert.state() where appropriate 2022-11-15 12:31:10 +01:00
Sam Brannen 2aa78889d2 Use consistent wording in precondition error messages 2022-11-15 12:31:01 +01:00
Sam Brannen 9d73f81e9c Avoid String allocations with Assert.notNull() 2022-11-08 14:23:22 +01:00
Phillip Webb 327eec09ae Allow TestCompiler DynamicClassLoader to resolve '.class' resources
Update `DynamicClassLoader` so that `findResource(...)` also considered
compiled class bytecode.

Closes gh-29347
2022-10-18 11:14:57 -07:00
Stephane Nicoll 76e87ad475 Polish 2022-10-10 15:09:00 +02:00
Stephane Nicoll efaee61f31 Harmonize accessors of RuntimeHints API
Closes gh-29269
2022-10-06 09:36:17 +02:00