Commit Graph

277 Commits

Author SHA1 Message Date
Juergen Hoeller
f57fcdee3c Polishing 2018-03-07 15:49:58 +01:00
Juergen Hoeller
6f7ad0304c Polishing 2018-03-01 00:29:38 +01:00
igor-suhorukov
8080f56db8 Polish: "@Override" should be used on overriding and implementing methods 2018-03-01 00:15:18 +01:00
Juergen Hoeller
a19d4deb24 Polishing 2018-02-28 16:41:59 +01:00
Juergen Hoeller
9962df6527 Polishing 2018-02-28 00:09:15 +01:00
Juergen Hoeller
95aad9cdc2 Interrupt listener invoker threads on shutdown (after initial wait step)
Issue: SPR-16536
2018-02-28 00:06:46 +01:00
igor-suhorukov
d1ccecd021 Polish: to get rid unnecessary array creation 2018-02-27 23:37:54 +01:00
igor-suhorukov
7bce04c06c Polish: combine catches block with same body 2018-02-27 12:51:28 +01:00
Juergen Hoeller
a5cbf5fe24 Consistent use of Collection.toArray with zero-sized array argument
Includes consistent use of ClassUtils.toClassArray (as non-null variant)

Issue: SPR-16523
2018-02-22 11:29:46 +01:00
Juergen Hoeller
95f7180298 Explicit documentation notes on transacted sessions vs AUTO_ACKNOWLEDGE
Issue: SPR-16487
2018-02-14 15:32:23 +01:00
igor-suhorukov
7826567df6 Polish: lamdbas containing only one statement should not nest this statement in a block 2018-02-14 01:22:01 +01:00
igor-suhorukov
0ee505b73e Polish: assertion arguments should be passed in the correct order,
use assertNull instead of assertEquals(null, value),
declare delta as double value in assertEquals
2018-02-10 17:17:28 +01:00
igor-suhorukov
9a6fbf59c5 Polish: follow name convention - make immutable fields final 2018-02-10 12:09:19 +01:00
Juergen Hoeller
b6ecfcf9ec CachingConnectionFactory makes its Session caching inactive during reset
Issue: SPR-16450
2018-02-02 11:33:10 +01:00
Juergen Hoeller
572c668726 Polishing 2018-01-19 21:30:37 +01:00
Juergen Hoeller
65a167f7fd JmsListenerAnnotationBeanPostProcessor properly deals with nested proxies
Issue: SPR-16196
2018-01-16 14:39:31 +01:00
Stephane Nicoll
42dfa40151 Make sure endpoint settings override default factory settings
Issue: SPR-16338
2018-01-15 15:42:50 +01:00
Juergen Hoeller
4c9ed0d87e Polishing 2018-01-12 18:24:00 +01:00
Juergen Hoeller
4adc820714 Warning instead of error for non-present type filter class
Issue: SPR-16356
2018-01-08 13:41:23 +01:00
Juergen Hoeller
72590dbb21 CachingConnectionFactory does not cache producer for temporary queue/topic
Issue: SPR-16353
2018-01-08 00:26:29 +01:00
Juergen Hoeller
4a57e26d76 Polishing 2018-01-07 23:33:35 +01:00
Juergen Hoeller
d1fac36e3e SchedulingConfigurer and JmsListenerConfigurer respect @Order
Issue: SPR-16090
2017-10-20 16:10:12 +02:00
Juergen Hoeller
75bd516251 Refined TemporaryLobCreator null handling (from 4.3.x)
Issue: SPR-15656
2017-09-27 15:40:13 +02:00
Juergen Hoeller
efce7902c4 Polishing 2017-09-27 01:34:11 +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
Stephane Nicoll
b275a06d16 Reuse JmsTemplate's MessageConverter in JmsMessagingTemplate
This commit makes sure that any custom MessageConverter set in a
JmsTemplate used by a JmsMessagingTemplate is reused as the payload
converter of the message.

Issue: SPR-15965
2017-09-18 14:27:47 +02:00
Stephane Nicoll
7aa956a920 Polish 2017-09-18 14:06:31 +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
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
47a7475898 Resolve remaining nullability warnings
Issue: SPR-15869
2017-08-18 00:15:46 +02:00
Sebastien Deleuze
73cf07e9a4 Fix overridden methods nullability
Issue: SPR-15869
2017-08-17 15:02:59 +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
Juergen Hoeller
9fc4fb10b0 Nullability fine-tuning around bean properties
Issue: SPR-15720
Issue: SPR-15792
2017-07-19 11:43:58 +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
c292a89b24 Http(Async)Client not actually nullable, plus MethodInterceptor nullability
Issue: SPR-15720
2017-07-19 00:15:37 +02:00
Juergen Hoeller
6d55b3a592 Perform onException delegation outside of connection monitor
Issue: SPR-15738
2017-07-07 20:44:09 +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
Juergen Hoeller
140542e8b1 Polishing 2017-06-26 18:59:17 +02:00
Juergen Hoeller
535103cd52 Fine-tune HTTP/RMI Invoker exception handling
Issue: SPR-15684
2017-06-20 16:50:35 +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
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
Stephane Nicoll
929ab10b49 Polish 2017-04-18 13:33:27 +02:00
Stephane Nicoll
4ffdb50681 Reuse QosSettings in JmsTemplate
See SPR-15408
2017-04-18 13:32:53 +02:00
Stephane Nicoll
a2acbee004 Polish 2017-04-18 13:18:08 +02:00