Commit Graph

237 Commits

Author SHA1 Message Date
Rossen Stoyanchev 97894a1c22 Improve logging dependencies for tests 2018-01-23 10:42:41 -05:00
Juergen Hoeller dd4f915234 Upgrade to JCache 1.1 (and Caffeine 2.6.1)
Issue: SPR-13574
2017-12-28 14:08:21 +01:00
Juergen Hoeller 9d27e86951 Upgrade to Hibernate Validator 6.0.7 2017-12-21 17:00:06 +01:00
Juergen Hoeller 3a51b5a9d2 Upgrade to Hibernate Validator 6.0.6 2017-12-15 15:58:12 +01:00
Juergen Hoeller 14a7da8183 Upgrade to Hibernate Validator 6.0.5 2017-11-19 21:16:10 +01:00
Juergen Hoeller b5cedd43eb Consistent and efficient access to BeanDefinition argument values
Issue: SPR-16192
2017-11-13 21:51:11 +01:00
Juergen Hoeller 3091feee23 SpringValidatorAdapter skips value retrieval for Set field without index
Issue: SPR-16177
2017-11-13 21:50:55 +01:00
Juergen Hoeller da9f138a65 Upgrade to Caffeine 2.6 and Undertow 1.4.21 2017-11-02 16:05:27 +01:00
Juergen Hoeller 9bab7a2708 Upgrade to Java Activation Framework 1.2 for test runtime
Includes upgrade to Hibernate Validator 6.0.4 (where applicable)

Issue: SPR-16115
2017-10-25 19:18:10 +02:00
Juergen Hoeller 9288990603 Varargs and consistent nullability in MailMessage implementations
Issue: SPR-15756
2017-10-21 23:18:54 +02:00
Juergen Hoeller e17ad551f3 Latest dependency updates (RxJava 1.3.3, Hibernate ORM 5.2.12, Hibernate Validator 5.4.2 & 6.0.3) 2017-10-20 16:16:06 +02:00
Juergen Hoeller efce7902c4 Polishing 2017-09-27 01:34:11 +02:00
Juergen Hoeller e2882fe1db Build against EE 8 API level wherever possible
Upgrade to JAXB 2.3, JAX-WS 2.3, Annotations 1.3.1, Interceptor 1.2.1.
Also includes Log4J 2.9.1 and Asciidoctor 1.5.6.
2017-09-24 17:18:21 +02:00
Juergen Hoeller 9190b76ab9 Latest dependency updates (POI 3.17, Rome 1.8, EhCache 3.4, Caffeine 2.5.6, RxJava 2.1.4, Tomcat 8.5.21, JRuby 9.1.13, Rhino 1.7.7.2) 2017-09-23 11:28:19 +02:00
Juergen Hoeller 7ae59d0c2a Nullability refinements on private and static methods
Based on IntelliJ IDEA 2017.3 introspection results.

Issue: SPR-15756
2017-09-22 18:22:14 +02:00
Sebastien Deleuze 1bc93e3d0f Revisit nullability annotations
This commit introduces the following changes.

1) It adds a new Spring @NonNull annotation which allows to apply
@NonNullApi semantic on a specific element, like @Nullable does.
Combined with @Nullable, it allows partial null-safety support when
package granularity is too broad.

2) @Nullable and @NonNull can apply to ElementType.TYPE_USE in order
to be used on generic type arguments (SPR-15942).

3) Annotations does not apply to ElementType.TYPE_PARAMETER anymore
since it is not supported yet (applicability for such use case is
controversial and need to be discussed).

4) @NonNullApi does not apply to ElementType.FIELD anymore since in a
lot of use cases (private, protected) it is not part for the public API
+ its usage should remain opt-in. A dedicated @NonNullFields annotation
has been added in order to set fields default to non-nullable.

5) Updated Javadoc and reference documentation.

Issue: SPR-15756
2017-09-15 13:26:41 +02:00
Juergen Hoeller 30d67f7c42 Tests for @Lazy Validator setup
Issue: SPR-15807
2017-09-10 21:56:23 +02:00
Juergen Hoeller 26284cac4f Hibernate Validator 5 compatible support for element constraints
Issue: SPR-15916
Issue: SPR-15839
2017-09-01 16:40:24 +02:00
Juergen Hoeller b122bc6dcc Upgrade to Hibernate Validator 6.0.2
Includes latest dependency updates (Netty 4.1.15, Undertow 1.4.19)

Issue: SPR-15808
2017-08-29 15:04:17 +02:00
Brian Clozel 2eeb428e95 Move modules to independent build files
The main `build.gradle` file contains now only the common build
infrastructure; all module-specific build configurations have
been moved to their own build file.

Issue: SPR-15885
2017-08-21 14:41:55 +02:00
Juergen Hoeller fac1f236c3 Upgrade to Servlet API 4.0 for MVC and merge EhCache 3 tests into spring-context-support
Includes general streamlining of dependency declarations with reduced version variables, direct use of EclipseLink 2.7 and its implicit JPA 2.2 dependency in spring-orm, mixed use of Hibernate 5.2.10 and 5.1.10 for integration tests, as well as an upgrade to Jetty 9.4.7 RC0 and a downgrade to Groovy 2.4.12 (since Groovy 2.5 won't be final in time for Spring Framework 5.0).

Issue: SPR-15879
Issue: SPR-15880
2017-08-21 01:34:11 +02:00
Sebastien Deleuze 73cf07e9a4 Fix overridden methods nullability
Issue: SPR-15869
2017-08-17 15:02:59 +02:00
Juergen Hoeller de09f8ca1f Support for Bean Validation 2.0 container elements (with BV 2.0 test setup)
Includes latest dependency updates (Hibernate Validator 6.0.1, Caffeine 2.5.4, Netty 4.1.14, Tomcat 8.5.19, Johnzon 1.1.2, JsonPath 2.4, Jython 2.7.1)

Issue: SPR-15839
Issue: SPR-15808
2017-08-08 17:26:30 +02:00
Juergen Hoeller 46eba3dbfa Nullability fine-tuning around declaration inconsistencies
Issue: SPR-15720
Issue: SPR-15792
2017-07-19 22:22:20 +02:00
Sebastien Deleuze fb4ddb0746 Make getters and setters null-safety consistent
This commit ensure that null-safety is consistent between
getters and setters in order to be able to provide beans
with properties with a common type when type safety is
taken in account like with Kotlin.

It also add a few missing property level @Nullable
annotations.

Issue: SPR-15792
2017-07-19 09:07:56 +02:00
Juergen Hoeller e7b77cb2b6 Drop legacy DisposableBean declaration on AbstractApplicationContext
Issue: SPR-15154
2017-07-07 20:50:35 +02:00
Juergen Hoeller cc74a2891a @Nullable all the way: null-safety at field level
This commits extends nullability declarations to the field level, formalizing the interaction between methods and their underlying fields and therefore avoiding any nullability mismatch.

Issue: SPR-15720
2017-06-30 01:54:16 +02:00
Stephane Nicoll 1ab678a2a3 Polish "Refactor iterator of Map with Java8's Map.forEach"
Closes gh-1459
2017-06-13 16:06:20 +02:00
diguage 1ef5f61ab2 Refactor iterator of Map with Java8's Map.forEach
See gh-1459
2017-06-13 16:06:20 +02:00
Stephane Nicoll 58242f2249 Polish 2017-06-13 10:13:14 +02:00
Stephane Nicoll fc64b8040f Polish "Replace relevant code with lambda"
Closes gh-1454
2017-06-13 09:42:20 +02:00
diguage 4b1478d830 Replace relevant code with lambda
See gh-1454
2017-06-13 08:55:38 +02:00
Juergen Hoeller f813712f5b Consistent use of @Nullable across the codebase (even for internals)
Beyond just formally declaring the current behavior, this revision actually enforces non-null behavior in selected signatures now, not tolerating null values anymore when not explicitly documented. It also changes some utility methods with historic null-in/null-out tolerance towards enforced non-null return values, making them a proper citizen in non-null assignments.

Some issues are left as to-do: in particular a thorough revision of spring-test, and a few tests with unclear failures (ignored as "TODO: NULLABLE") to be sorted out in a follow-up commit.

Issue: SPR-15540
2017-06-07 14:19:15 +02:00
Sebastien Deleuze 1f28825f9d Add more @Nullable parameters based on null usage
Issue: SPR-15540
2017-05-31 21:42:23 +02:00
Sebastien Deleuze b47d713e14 Add missing @Nullable annotations on parameters
Issue: SPR-15540
2017-05-31 16:56:08 +02:00
Sebastien Deleuze 87598f48e4 Introduce null-safety of Spring Framework API
This commit introduces 2 new @Nullable and @NonNullApi
annotations that leverage JSR 305 (dormant but available via
Findbugs jsr305 dependency and already used by libraries
like OkHttp) meta-annotations to specify explicitly
null-safety of Spring Framework parameters and return values.

In order to avoid adding too much annotations, the
default is set at package level with @NonNullApi and
@Nullable annotations are added when needed at parameter or
return value level. These annotations are intended to be used
on Spring Framework itself but also by other Spring projects.

@Nullable annotations have been introduced based on Javadoc
and search of patterns like "return null;". It is expected that
nullability of Spring Framework API will be polished with
complementary commits.

In practice, this will make the whole Spring Framework API
null-safe for Kotlin projects (when KT-10942 will be fixed)
since Kotlin will be able to leverage these annotations to
know if a parameter or a return value is nullable or not. But
this is also useful for Java developers as well since IntelliJ
IDEA, for example, also understands these annotations to
generate warnings when unsafe nullable usages are detected.

Issue: SPR-15540
2017-05-27 08:57:01 +02:00
Juergen Hoeller e835f4d025 Revised png and jpeg mappings
Issue: SPR-15546
Issue: SPR-15557
2017-05-17 14:21:44 +02:00
Stephane Nicoll 547c4f69a4 Add getTargetDataSource to TransactionAwareCacheDecorator
Issue: SPR-15479
2017-04-27 11:34:10 +02:00
Stephane Nicoll 333e5c6b01 Polish 2017-04-27 11:29:14 +02:00
Juergen Hoeller a55a0f26cb FreeMarkerConfigurationFactory falls back to SpringTemplateLoader on any exception
Issue: SPR-15445
2017-04-12 18:06:37 +02:00
Stephane Nicoll 73909f41cb Polish 2017-02-20 16:29:05 +01:00
Stephane Nicoll 1c74a1a0fe Improve allowNullValue handling when a null value is provided
This commit improves `AbstractValueAdaptingCache` to throw a dedicated
exception if `allowNullValues` is `false` and a `null` value is provided
anyway. This avoid a lower-level exception from the cache library that
will miss some context.

Issue: SPR-15173
2017-02-20 16:08:08 +01:00
Juergen Hoeller 214d0d76a5 Polishing 2017-02-18 01:01:35 +01:00
Stephane Nicoll 85b20aa08a Polish 2017-02-06 15:27:38 +01:00
Stephane Nicoll 908261b136 Polish contribution
Closes gh-1292
Issue: SPR-15188
2017-02-06 15:27:38 +01:00
David Brimley 3476d10efa Honour ErrorHandler if `Cache.put` fails
This commit makes sure that the `ErrorHandler` is invoked if the cache
fails to put an element (be it in the main cache or the exception cache).

See gh-1292
Issue: SPR-15188
2017-02-06 15:27:38 +01:00
Juergen Hoeller 1b2dc3638f Revisit Assert to avoid single-arg assert methods (with refined messages)
Issue: SPR-15196
2017-01-30 22:15:55 +01:00
Juergen Hoeller e19dff179e Polishing 2017-01-12 21:18:01 +01:00
Juergen Hoeller 3726c6f18d Polishing 2016-10-21 12:26:27 +02:00
wolverine.kim a3062dfe78 Fix typo
Closes gh-1129
2016-08-10 10:44:07 +02:00