Commit Graph

1301 Commits

Author SHA1 Message Date
Juergen Hoeller 2d0ab4740c Consistent hasText checks for CharSequence vs String
Directly inlined hasLength implementations for proper nullability detection in IntelliJ, assuming a hasText checked value is never null afterwards. Since the JVM is going to do this at runtime anyway, this is effectively equivalent but more indicative for source code introspection algorithms.

Issue: SPR-15540
2017-10-24 13:16:47 +02:00
Juergen Hoeller 182da15908 BridgeMethodResolver properly resolves interface hierarchies
Issue: SPR-16103
2017-10-24 01:01:49 +02:00
Juergen Hoeller 55b0c2f243 Polishing 2017-10-24 01:01:42 +02:00
Juergen Hoeller ecea82d3a5 Polishing 2017-10-23 17:14:09 +02:00
Juergen Hoeller 75ec973bae Refined tests for StringUtils.starts/endsWithIgnoreCase
Issue: SPR-16095
2017-10-22 20:29:46 +02:00
Juergen Hoeller 5d41e0f012 Avoid temporary String creation in StringUtils.starts/endsWithIgnoreCase
Issue: SPR-16095
2017-10-22 14:31:17 +02:00
Juergen Hoeller 9a88ebdeba Consistent hasText checks for CharSequence vs String
Issue: SPR-15540
2017-10-22 12:12:32 +02:00
Arjen Poutsma c7a15260d6 Various DataBuffer improvements
This commit introduces various improvements in DataBuffer:

- DataBuffer now exposes its read and write position, as well as its
capacity and writable byte count.
- Added DataBuffer.asByteBuffer(int, int)
- DataBufferUtils.read now reads directly into a DataBuffer, rather than
copying a ByteBuffer into a DataBuffer
- TomcatHttpHandler now reads directly into a DataBuffer

Issues: SPR-16068 SPR-16070
2017-10-19 10:38:52 +02:00
Juergen Hoeller 3d1023be8c Polishing 2017-10-17 11:56:30 +02:00
Rossen Stoyanchev b4c95bf278 ReactiveAdapterRegistry uses Reactor's JdkFlowAdapter
Issue: SPR-16052
2017-10-16 20:49:22 -04:00
Juergen Hoeller c29b6f5b55 Consistent handling of null array for arguments
Issue: SPR-16075
2017-10-16 15:34:18 +02:00
Sam Brannen 8a94077da0 Clean up warnings in spring-core 2017-10-15 18:28:08 +02:00
Juergen Hoeller 43b5e21947 Consistent alias declarations for value attribute on stereotypes
Issue: SPR-16066
2017-10-13 18:18:12 +02:00
Juergen Hoeller dc3299152c Polishing 2017-10-09 16:06:03 +02:00
Juergen Hoeller 53091c76bf Convenient forType methods for ParameterizedTypeReference
Issue: SPR-16054
2017-10-09 13:59:01 +02:00
Juergen Hoeller ec345bf162 Revised handling of missing data class arguments
Includes unified detection of Kotlin's optional parameters in MethodParameter.isOptional(), reduces BeanUtils.findPrimaryConstructor to Kotlin semantics (for reuse in AutowiredAnnotationBeanPostProcessor), and finally introduces a common KotlinDetector delegate with an isKotlinType(Class) check.

Issue: SPR-15877
Issue: SPR-16020
2017-09-28 00:31:12 +02:00
Juergen Hoeller efce7902c4 Polishing 2017-09-27 01:34:11 +02:00
Juergen Hoeller 9d8e3d4185 Explicit check for duplicates in addClassPathManifestEntries
Issue: SPR-15989
2017-09-26 11:49:49 +02:00
Sebastien Deleuze 3996f33399 Support non-standard classes in Kotlin reflection discovery methods
Issue: SPR-15999
2017-09-24 23:10:40 +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 6c4a103f70 Remove support for generics nullability for now
See https://github.com/Kotlin/KEEP/issues/79
2017-09-21 18:44:27 +02:00
Juergen Hoeller 15c82afc1c Consistent conversion of Optional array/list arrangements
Issue: SPR-15918
Issue: SPR-15919
Issue: SPR-15676
2017-09-20 18:28:49 +02:00
Juergen Hoeller 185c2bf5b6 Upgrade to ASM 6.0
Issue: SPR-14514
2017-09-19 13:49:32 +02:00
Juergen Hoeller 346d2edce1 Revised org.springframework.lang javadoc
Issue: SPR-15756
2017-09-18 23:59:11 +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
Sebastien Deleuze 5ae35f606c Leverage kotlin-reflect to determine parameter names
This is especially useful to determine interface parameter names
without requiring Java 8 -parameters compiler flag.

Issue: SPR-15541
2017-09-06 15:56:45 +02:00
Juergen Hoeller 204ddebd68 SimpleAsyncTaskExecutor properly respects NO_CONCURRENCY
Issue: SPR-15895
2017-09-01 13:44:49 +02:00
Brian Clozel 397fd24849 Revert "Leverage Kotlin plugin dependency management"
This reverts commit 3e2f6c848a.
2017-08-22 21:29:39 +02:00
Sebastien Deleuze 3e2f6c848a Leverage Kotlin plugin dependency management 2017-08-22 17:35:57 +02:00
Sebastien Deleuze ab6430569d Efficient Kotlin metadata detection
Follow-up of 3991ab4a23.

Issue: SPR-15673
2017-08-22 16:22:25 +02:00
Brian Clozel cc3d7d2d48 Apply dependency management to selected modules
This commit applies the Dependency Management Plugin to modules that
require it; right now Spring Framework is importing BOMs for Netty and
Reactor dependencies only.

Instead of applying those BOMs to all modules, they're applied only
where they're needed.

Issue: SPR-15885
2017-08-21 14:42:03 +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 3991ab4a23 Efficient Kotlin metadata detection
Issue: SPR-15673
2017-08-21 01:33:20 +02:00
Sebastien Deleuze 73cf07e9a4 Fix overridden methods nullability
Issue: SPR-15869
2017-08-17 15:02:59 +02:00
Juergen Hoeller fabc9c28d7 Align new FileSystemUtils NIO implementation with original behavior
Issue: SPR-15845
Issue: SPR-15846
2017-08-03 14:21:00 +02:00
Juergen Hoeller 26de6268aa Polishing 2017-07-27 16:06:56 +02:00
Juergen Hoeller fac83b2e7c Consistent logging in Environment and PropertySource implementations
Issue: SPR-15825
2017-07-27 16:02:18 +02:00
Juergen Hoeller c5fc400534 (AnnotationAware)OrderComparator supports null values again
Issue: SPR-15823
2017-07-27 11:39:05 +02:00
Arjen Poutsma d5da823482 Fix race condition for AsynchronousFileChannel
This commit fixes an issue in the DataBufferUtils.write variant that
takes a AsynchronousFileChannel.

Issue: SPR-15798
2017-07-26 14:10:48 +02:00
Rossen Stoyanchev d7a7b08b08 Find the last plus for suffix MediaType
Issue: SPR-15795
2017-07-25 10:45:59 +02:00
Sebastien Deleuze 2437500cfe Ignore DataBufferUtilsTests#writeAsynchronousFileChannel
Issue: SPR-15798
2017-07-20 13:51:13 +02:00
Juergen Hoeller e4651d6b50 XmlEventDecoder uses common defensive XMLInputFactory (now in StaxUtils)
Issue: SPR-15797
2017-07-20 13:17:27 +02:00
Sebastien Deleuze fa4d139684 Support instantiating Kotlin classes with optional parameters
This commit updates BeanUtils class in order to add Kotlin optional
parameters with default values support to the immutable data classes
support introduced by SPR-15199.

Issue: SPR-15673
2017-07-20 10:44:06 +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
Sebastien Deleuze e2fd04dff3 Add a [] Kotlin extension for PropertyResolver#getRequiredProperty 2017-07-19 08:12:32 +02:00
Juergen Hoeller 12114a9d4c Consistent use of NIO.2 for file read/write interactions
Issue: SPR-15748
2017-07-18 00:54:41 +02:00