Juergen Hoeller
d0bbbf4cae
OrderUtils caches order values (for AnnotationAwareOrderComparator)
...
Issue: SPR-17064
2018-07-19 11:58:42 +02:00
Rossen Stoyanchev
4d6f2df3cb
Add LogUtils and HttpLogging
...
SPR-17012
2018-07-18 15:32:50 -04:00
Juergen Hoeller
23d4862017
Find annotations on implemented generic interface methods as well
...
Issue: SPR-16060
2018-07-18 19:44:30 +02:00
Sebastien Deleuze
e8034f2f96
Adapt DefaultParameterNameDiscoverer to Graal constraints
...
When compiling or running as a Graal native image, no
ParameterNameDiscoverer is used.
Issue: SPR-17005
2018-07-18 17:17:47 +02:00
Juergen Hoeller
cab35aa788
StringUtils.parseLocaleString detects variant without country
...
Includes tests for parsing all available locales on the JVM, checking toString/toLanguageTag equality between parsed and original locale.
Issue: SPR-7598
Issue: SPR-16651
2018-07-18 11:10:26 +02:00
Juergen Hoeller
88e4006790
CookieLocaleResolver is RFC6265 and language tag compliant by default
...
Like CookieLocaleResolver, LocaleChangeInterceptor parses both locale formats by default now. Since it does not need to render the locale, its languageTagCompliant property is not relevant anymore at all.
The parseLocale method in StringUtils validates the locale value now and turns an empty locale into null, compatible with parseLocaleString behavior and in particular aligned with web locale parsing needs.
Issue: SPR-16700
Issue: SPR-16651
2018-07-17 17:57:59 +02:00
Juergen Hoeller
cacd14c805
Never return null from AnnotationMetadata.getMetaAnnotationTypes
...
Issue: SPR-17046
2018-07-16 18:05:10 +02:00
Juergen Hoeller
f6fdffd663
Lazily retrieve delegate beans in AsyncConfigurer and CachingConfigurer
...
Introduces a configure method pattern for Supplier-style configuration and a common SingletonSupplier decorator for method reference suppliers. Also declares jcache.config and jcache.interceptor for non-null conventions.
Issue: SPR-17021
2018-07-14 19:29:32 +02:00
Rossen Stoyanchev
1b1bc7f5b5
Switch defaults and model for logging sensitive data
...
Issue: SPR-17029
2018-07-11 11:10:03 -04:00
Juergen Hoeller
6887802526
Fallback to ClassLoader.defineClass for Lookup.defineClass LinkageError
...
Issue: SPR-16902
2018-07-10 22:13:57 +02:00
Juergen Hoeller
a1d209726c
Upgrade to ASM master (6.2+) and CGLIB 3.2.7
...
Issue: SPR-16398
2018-07-10 18:51:01 +02:00
Juergen Hoeller
833343f17c
Specifically rethrow IllegalAccessError in isPresent/resolveClassName
...
Issue: SPR-17018
2018-07-09 14:31:45 +02:00
Juergen Hoeller
fd0220b85c
Suppress rawtypes warning for createReferenceArray
2018-07-09 14:28:15 +02:00
stsypanov
6d6aa72e8f
improve performance of projection instantiation
2018-07-09 13:39:23 +02:00
Rossen Stoyanchev
4bd22eeb13
Fallback logger for logging in http and codec packages
...
Issue: SPR-17012
2018-07-07 10:54:03 -04:00
Rossen Stoyanchev
bca9f51092
Polish hint for suppressing logging at Encoder/Decoder
2018-07-06 20:32:08 -04:00
Juergen Hoeller
d8c7270c00
Consistent Iterator/Stream support in PropertySources and PropertyValues
...
Issue: SPR-16894
2018-07-05 23:59:56 +02:00
Rossen Stoyanchev
82310660fd
Correlated encoding/decoding log messages via hints
...
Issue: SPR-16966
2018-07-05 08:28:15 -04:00
Juergen Hoeller
5dc8b5de6d
Polishing
2018-07-04 15:07:17 +02:00
Sebastien Deleuze
9b7a492bc9
Test RxReactiveStreams presence in ReactiveAdapterRegistry
...
Issue: SPR-17000
2018-07-03 18:00:47 +02:00
Sebastien Deleuze
dcbaecea2a
Perform explicit class checks in ReactiveAdapterRegistry
...
In order to allow Spring Framework applications running as GraalVM
native images, ReactiveAdapterRegistry should perform explicit class
checks instead of catching Throwable in order to avoid
UnsupportedFeatureError errors.
Issue: SPR-17000
2018-07-03 13:35:11 +02:00
Juergen Hoeller
779cf8d240
ConcurrentReferenceHashMap caches EntrySet in volatile field
...
Includes an efficient implementation of isEmpty(), not relying on a full entry count but rather backing out once a non-empty hash segment has been found.
Issue: SPR-16994
2018-07-02 22:32:57 +02:00
Juergen Hoeller
06f9fb9aeb
Refine Class serializability check for actual Graal compatibility
...
Issue: SPR-16992
2018-07-02 22:32:29 +02:00
Juergen Hoeller
e5a6711d29
Consistent final declaration for static delegate classes
...
Issue: SPR-16968
2018-07-02 13:55:18 +02:00
Juergen Hoeller
2ade122543
Bypass serializable type wrapping if java.lang.Class not serializable
...
Issue: SPR-16992
2018-07-02 13:55:03 +02:00
Juergen Hoeller
4ff1e3e74b
Consistent abstract declaration for utility classes (plus polishing)
...
Issue: SPR-16968
2018-07-01 02:31:20 +02:00
Rossen Stoyanchev
907a306ee2
Fix locally failing test in FlushingIntegrationTests
2018-06-29 18:15:52 -03:00
Juergen Hoeller
40efcc933c
Polishing
2018-06-28 14:51:33 +02:00
Juergen Hoeller
b68e692854
Conventions lazily retrieves shared ReactiveAdapterRegistry
...
Issue: SPR-16981
2018-06-28 14:47:52 +02:00
Juergen Hoeller
7a02e438e7
StringUtils.cleanPath retains plain pointer to current directory
...
Issue: SPR-16908
2018-06-28 14:15:16 +02:00
Phillip Webb
a89e716cc7
Use tabs rather than spaces in tests
...
Update tests to ensure that tabs are used instead of spaces. Also
consistently apply a new line at the end of each file.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb
1c25cec44f
Polish test code
...
Polish a few issue identified when adding checkstyle to the
build. Although checkstyle is not enforcing rules on tests,
these are a few minor changes that are still worth making.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb
81451aa800
Organize imports
...
Reorganize imports to ensure consistent ordering. This commit also
expands any `.*` static imports in favor of using fully-qualified
method references.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb
b220d94cc2
Never use parenthesis for single lambda arguments
...
Update all lambdas that take a single argument so that parenthesis
are never used.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb
5cedd0d5d4
Consistently use tabs rather than spaces
...
Update code that has accidentally used spaces instead of tabs.
Also remove all trailing whitespace.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb
ad6d183a06
Remove unneeded conditional logic
...
Update `ConversionUtils` to remove conditional logic that isn't
necessary.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb
9de3689f63
Never use 'this.' when accessing loggers
...
Ensure that `this.` is never used when accessing loggers.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb
0b53c1096a
Always use 'this.' when accessing fields
...
Ensure that `this.` is used consistently when accessing class
fields.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb
eeebd51f57
Use consistent class design
...
Update all classes so that inner classes are always last. Also
ensure that utility classes are always final and have a private
constructor and make exceptions final whenever possible.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb
e9d1b39aff
Apply consistent copyright header
...
Add copyright header to `package-info.java` files and fix a few
malformed headers on existing java files.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb
c3a17dfd47
Ensure all files end with a newline
...
Update all files to ensure that they always end with a new line.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb
e0480f75ac
Fix javadoc checkstyle issues
...
Fix checkstyle violations for javadoc.
Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Juergen Hoeller
847202c8f8
MimeTypeUtils lazily initializes SecureRandom for multipart boundary
...
Issue: SPR-16974
2018-06-25 18:12:43 +02:00
Rossen Stoyanchev
900bc8a2e3
Logging improvements for WebFlux
...
Issue: SPR-16898
2018-06-22 22:44:24 -04:00
Sam Brannen
cafb5033e2
Polishing
2018-06-19 13:50:13 +03:00
Sam Brannen
bea0e399b8
Polish profile expression support
...
Issue: SPR-12458
2018-06-17 00:15:18 +03:00
Sam Brannen
4184ebe799
Polish profile expression support
...
Issue: SPR-12458
2018-06-16 21:40:22 +03:00
Juergen Hoeller
38f9a7b072
FileSystemResource supports java.nio.file.Path based setup
...
Issue: SPR-16833
2018-06-15 22:12:14 +02:00
Juergen Hoeller
bb6ab5dc91
OS-independent alphabetical sorting of directory content
...
Issue: SPR-16838
2018-06-15 22:09:29 +02:00
Stephane Nicoll
1f3b4f1863
Polish "Add profile expression support"
...
Issue: SPR-12458
2018-06-15 16:01:16 +02:00
Phillip Webb
e2623b7d35
Add profile expression support
...
Allow the `Environment` to accept a generic `Profiles` interface which
can support more complex matching rules. The previous
`acceptsProfiles(String...)` method now uses `Profiles.of` which
supports basic profile expressions such as "(a | b) & !c"
Issue: SPR-12458
2018-06-15 16:01:16 +02:00
Juergen Hoeller
c38cb43527
MethodParameter strictly asserts parameter index -1 for return type
...
Issue: SPR-16889
2018-06-14 00:42:19 +02:00
Rossen Stoyanchev
0078f46779
Use reflection for JdkFlowAdapter
...
To avoid compiler issues on Eclipse.
2018-06-13 09:38:54 -04:00
Juergen Hoeller
0777a80efe
Polishing
...
(cherry picked from commit a2765c0
)
2018-06-11 19:17:57 +02:00
Juergen Hoeller
b790bd1fd6
LinkedCaseInsensitiveMap explicitly implements put/computeIfAbsent
...
Issue: SPR-16926
2018-06-11 14:10:12 +02:00
Yun
28e402bc76
Prevent instantiation of AnnotatedElementUtils
...
Closes gh-1848
2018-06-11 08:32:03 +02:00
Rossen Stoyanchev
010352163b
Eliminate the need for Encoder#getContentLength
...
Issue: SPR-16892
2018-06-04 15:48:47 -04:00
Sebastien Deleuze
a7a29a8226
Revisit PropertyResolver Kotlin extensions
...
Issue: SPR-16883
2018-05-31 12:20:37 +02:00
Juergen Hoeller
616a40adb6
ClassPathResource.isReadable() returns false for content length 0
...
Issue: SPR-16832
2018-05-29 22:31:47 +02:00
Juergen Hoeller
74fcdea2d9
SimpleAliasRegistry logs info message for alias overriding
...
Issue: SPR-16871
2018-05-29 21:51:33 +02:00
Juergen Hoeller
46a89d9534
Restore lenient null return value for ConditionContext.getBeanFactory()
...
Includes nullable return value for getClassLoader() with corresponding notes in applicable javadoc.
Issue: SPR-16866
2018-05-29 21:51:06 +02:00
Juergen Hoeller
69f14a2038
ClassPathResource.isReadable() checks InputStream (for jar directories)
...
Resource.isReadable() is defined to semantically imply exists() now.
Issue: SPR-16832
2018-05-29 21:47:33 +02:00
Sebastien Deleuze
406f6ec74d
Fix PropertyResolverExtensions.kt location
2018-05-28 15:51:22 +02:00
Rossen Stoyanchev
d58888777f
Polish ReactiveAdapterRegisry
2018-05-18 21:32:46 -04:00
Sebastien Deleuze
2c85be333c
Filter synthetic in ReflectionUtils#USER_DECLARED_METHODS
...
Issue: SPR-16823
2018-05-15 14:58:50 +02:00
Oleksandr Hasheniuk
6545cab42c
Improve performance of StringUtils#trimWhitespace
...
Issue: SPR-16766
2018-05-01 11:16:34 +02:00
nkjackzhang
fb0e3e9356
Fix a typo in @Nullable Javadoc
2018-04-18 11:53:09 +02:00
Juergen Hoeller
2f4010e8d3
Correctly delegate to OrderUtils.getPriority for DecoratingProxy
...
Issue: SPR-16739
2018-04-17 23:37:42 +02:00
Juergen Hoeller
d78e27f1e9
Avoid repeated superclass introspection in findAnnotation(Method,...)
...
Issue: SPR-16730
2018-04-17 16:44:28 +02:00
Juergen Hoeller
51be8a7303
Workaround for generic parameter types on inner class constructors
...
Issue: SPR-16734
2018-04-17 14:32:54 +02:00
Juergen Hoeller
b95e05db04
AspectJExpressionPointcut consistently resolves superinterface methods
...
Includes efficient check for same ClassLoader in ClassUtils.isVisible, efficient MethodMatchers check for IntroductionAwareMethodMatcher, and supertype method resolution in MethodMapTransactionAttributeSource.
Issue: SPR-16723
2018-04-14 15:10:05 +02:00
Juergen Hoeller
0efa7a05ad
ClassUtils.isCacheSafe delegates to isVisible for resolving classes
...
Issue: SPR-16714
2018-04-12 20:55:26 +02:00
Juergen Hoeller
46e3a919fe
Cache-safety check for sibling loaders resolving the same classes
...
Issue: SPR-16714
2018-04-12 18:50:32 +02:00
Juergen Hoeller
da80502ea6
AnnotationUtils.getAnnotation non-null check for synthesizeAnnotation
...
Issue: SPR-16708
2018-04-11 12:50:27 +02:00
Juergen Hoeller
61c3db0869
MethodHandles.Lookup.defineClass for CGLIB class definition purposes
...
Spring's CGLIB fork is patched with local copies of affected files here, introducing the notion of a "contextClass" (e.g. the proxy superclass) which gets passed through to ReflectUtils.defineClass for delegating to MethodHandles.Lookup.defineClass eventually, against a privateLookupIn(contextClass) lookup context on JDK 9/10/11.
Issue: SPR-15859
2018-04-11 12:47:55 +02:00
Sam Brannen
8874427cf4
Clean up warnings in spring-core
2018-04-10 13:10:58 +02:00
Juergen Hoeller
5d0700b936
AnnotationUtils.annotatedInterfaceCache available as deprecated field
...
Issue: SPR-16675
2018-04-03 12:21:03 +02:00
Juergen Hoeller
6102715b8d
Consistent treatment of proxy classes and interfaces for introspection
...
Issue: SPR-16675
Issue: SPR-16677
2018-04-03 02:42:41 +02:00
Juergen Hoeller
cc379f1cc7
Polishing
2018-04-01 12:57:19 +02:00
Juergen Hoeller
912c270f2b
Polishing
2018-03-31 17:49:21 +02:00
Juergen Hoeller
129c05bcff
Comprehensively cache annotated methods for interfaces and superclasses
...
Issue: SPR-16675
2018-03-31 15:12:02 +02:00
Juergen Hoeller
4da27c2a73
Avoid unnecessary introspection on methods and meta-annotations
...
Issue: SPR-16667
2018-03-31 00:18:14 +02:00
Kazuki MATSUDA
d232fffa63
Use whenComplete since (null) return value not needed
2018-03-30 11:07:46 -04:00
Juergen Hoeller
22a8a668c9
AnnotationTypeFilter assumes no custom annotations on common Java types
...
Issue: SPR-16667
2018-03-30 15:31:43 +02:00
Juergen Hoeller
7a8d41e5d6
Extended set of common classes and language interfaces in ClassUtils
...
Issue: SPR-16667
2018-03-30 13:41:22 +02:00
Sam Brannen
a6c45f0cd9
Polishing
2018-03-30 11:45:28 +02:00
Juergen Hoeller
d553ddc5b3
Nullability refinements (based on IntelliJ IDEA 2018.1 introspection)
...
Issue: SPR-15756
2018-03-29 23:50:17 +02:00
Sam Brannen
17703e5dde
Polishing
2018-03-29 17:45:55 +02:00
Sam Brannen
7c28152c13
Introduce ClassUtils.isInnerClass() utility method
2018-03-29 17:45:25 +02:00
Juergen Hoeller
b165475eb6
Polishing
2018-03-29 16:05:52 +02:00
Juergen Hoeller
08dad4e3ac
Consistent references to primitive types (in alphabetical order)
2018-03-29 16:05:00 +02:00
Juergen Hoeller
53d01392d7
Workaround for inner class constructor parameter annotation bug in javac
...
Issue: SPR-16652
2018-03-29 15:45:02 +02:00
Juergen Hoeller
3ac46da22f
Correct description for doWithLocalFields
...
Issue: SPR-16658
2018-03-29 15:42:30 +02:00
Sam Brannen
4b9e3a9211
Introduce failing test for SPR-16652
...
This commit introduces tests for looking up annotations on parameters
in constructors for nested and inner classes via Spring's
MethodParameter abstraction.
The test for an inner class is currently disabled since it fails on
JDK 8. See JIRA issue for details.
Issue: SPR-16652
2018-03-28 17:42:55 +02:00
Juergen Hoeller
b2d87abcbb
Polishing
2018-03-28 12:06:38 +02:00
Rossen Stoyanchev
e00384a6fd
MimeTypeUtils trims parameter names / values
...
Issue: SPR-16630
2018-03-27 19:56:09 -04:00
Juergen Hoeller
e3d0ef6015
Use Map.forEach instead of manual Map.Entry iteration wherever possible
...
Issue: SPR-16646
2018-03-27 00:38:32 +02:00
Rossen Stoyanchev
ab2410c754
MimeTypeUtils uses SecureRandom
...
The prevailing current wisdom is to use the default constructor for
secure and let it pick the best algorithm for the OS.
On Java 8 (Oracle), Linux this results in "NativePRNG" which uses
/dev/random (potentially blocking) for the initial seed, and
/dev/urandom (non-blocking) for subsequent calls to nextInt.
Issue: SPR-16635
2018-03-23 21:45:41 -04:00
Juergen Hoeller
f00afe3247
Use (Concurrent)Map.computeIfAbsent for lazy nested collection creation
2018-03-23 17:36:23 +01:00
Rossen Stoyanchev
94c525cdc8
Polish @RequestPart support
2018-03-21 18:26:13 -04:00
Rossen Stoyanchev
2ff35daf9b
Add test case based on SPR-16615
2018-03-19 13:32:10 -04:00
Rossen Stoyanchev
30583a62cf
Fix Class isAssignableFrom checks for Resource conversion
...
Issue: SPR-16606
2018-03-16 16:18:05 -04:00
Juergen Hoeller
356ef45e99
ConcurrentReferenceHashMap properly handles getOrDefault for null values
...
Issue: SPR-16584
2018-03-14 17:17:04 +01:00
Juergen Hoeller
967a2ef2d2
Validate Class attributes as well as Class array attributes
...
Issue: SPR-16564
2018-03-12 20:41:44 +01:00
Juergen Hoeller
50e980c02f
Validate declared annotations before deciding between reflection and ASM
...
Issue: SPR-16564
2018-03-12 13:40:26 +01:00
Juergen Hoeller
1b1a69a144
SimpleAliasRegistry fully synchronizes registerAlias and removeAlias
...
Issue: SPR-16577
2018-03-12 13:27:48 +01:00
Sam Brannen
42b4f6e1ff
Clean up warnings and dead code in spring-core module
2018-03-11 14:13:30 +01:00
igor-suhorukov
0c45c4c6a3
lamdbas containing only one statement should not nest this statement in a block
2018-03-08 21:49:04 +01:00
Juergen Hoeller
139dc1d373
Polishing (collapsed if checks, consistent downcasts, refined javadoc)
2018-03-08 18:11:57 +01:00
igor-suhorukov
0f7485b01d
Polish: reorder the modifiers to comply with the Java Language Specification.
2018-03-08 17:57:47 +01:00
Rossen Stoyanchev
27815847b1
content-length support in EncoderHttpMessageWriter
...
EncoderHttpMessageWriter checks explicitly for Mono publishers and sets
the content length, if it is known for the given data item.
Issue: SPR-16542
2018-03-06 19:04:02 -05:00
Juergen Hoeller
eb9c43dcbc
Reliably expose nested cause exception message for PersistenceException
...
Issue: SPR-16559
2018-03-06 23:06:14 +01:00
Juergen Hoeller
c543368aad
Polishing
2018-03-03 17:33:48 +01:00
Juergen Hoeller
cd4f0935c5
Revised deprecation markers
2018-03-01 23:43:06 +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
6663d0ff07
Support for ResolvableType.getType().getTypeName() on Java 8
...
Issue: SPR-16535
2018-02-26 17:19:12 +01:00
igor-suhorukov
49fd724d8f
Polish: String function use should be optimized for single characters
2018-02-25 20:48:47 +01:00
igor-suhorukov
c782075a13
Polish: Array designators "[]" should be on the type, not the variable
2018-02-25 13:14:20 +01:00
Juergen Hoeller
3531c104b0
Prefer Collections.addAll call with array over Set.addAll(Arrays.asList)
2018-02-25 00:21:39 +01:00
igor-suhorukov
67a91cf6f9
Polish: redundant pairs of parentheses should be removed
2018-02-25 00:01:43 +01:00
Juergen Hoeller
0f740527c1
Deprecated StringUtils.mergeStringArrays
2018-02-22 15:13:57 +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
f316f6a46a
Remove unnecessary assertions from annotation resolution code paths
...
Issue: SPR-16514
2018-02-19 10:29:09 +01:00
Juergen Hoeller
d7cab23e6d
Consistent use of StringUtils.toStringArray
...
(cherry picked from commit 6d11b40
)
2018-02-16 20:49:17 +01:00
Juergen Hoeller
8d3264f680
Prefer List.sort(Comparator) over Collections.sort(List, Comparator)
2018-02-16 10:23:18 +01:00
Juergen Hoeller
3b810f3544
Consistent Class array vs vararg declarations (and related polishing)
2018-02-14 14:44:00 +01:00
Juergen Hoeller
99662bc702
Polishing
2018-02-13 23:32:10 +01:00
igor-suhorukov
45e520ed86
Polish: remove unused private fields, remove empty operator
2018-02-13 23:00:18 +01:00
Juergen Hoeller
0c78c9c6f7
Refined javadoc and exception messages
2018-02-13 15:25:42 +01:00
Vladimir Sitnikov
659f13be1c
Avoid creating message arguments to Assert.isABC calls
...
See 67f184293b
2018-02-13 12:31:49 +01:00
Juergen Hoeller
b449928691
Avoid unused arguments for internal delegates
2018-02-13 11:40:28 +01:00
Juergen Hoeller
b089ded5b0
Polishing
2018-02-12 15:55:18 +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
6ea0af3540
Polish: Lambdas should be replaced with method references
2018-02-10 12:09:46 +01:00
igor-suhorukov
9a6fbf59c5
Polish: follow name convention - make immutable fields final
2018-02-10 12:09:19 +01:00
Juergen Hoeller
e873b18f43
ResolvableType.forClassWithGenerics retains original TypeVariables
...
Issue: SPR-16456
2018-02-09 15:29:00 +01:00
Stephane Nicoll
991eb4858e
Update copyright header
2018-02-09 10:16:58 +01:00
igor-suhorukov
e381514b07
Collection.isEmpty() should be used to test for emptiness
...
Closes gh-1670
2018-02-09 10:11:44 +01:00
igor-suhorukov
4c888d0f32
Polish
...
Closes gh-1669
2018-02-09 10:10:05 +01:00
Arjen Poutsma
fb61af1882
Allow "release on close" for DataBuffer.asInputStream
...
This commit introduces DataBuffer.asInputStream(boolean), that can
release the underlying buffer when the stream is closed.
Furthermore, this commit adds additional javadoc.
Issue: SPR-16444
2018-02-08 10:11:53 +01:00
Arjen Poutsma
609f173ebc
StringDecoder shouldn't chop off strings randomly
...
Issue: SPR-16337
2018-02-02 15:59:21 +01:00
Juergen Hoeller
cfe7ff1c81
MimeType.compareTo uses case-insensitive Charset (analogous to equals)
...
Issue: SPR-16458
2018-02-02 13:44:07 +01:00
Juergen Hoeller
c5a33d62dd
TypeVariablesVariableResolver compares variables by full equality again
...
Issue: SPR-16456
2018-02-02 12:41:43 +01:00
Juergen Hoeller
30f6e447d5
TypeVariablesVariableResolver compares variables by name
...
Issue: SPR-16456
2018-02-02 11:34:36 +01:00
Juergen Hoeller
ef3f93e84a
Language tag parsing support in StringUtils and StringToLocaleConverter
...
Issue: SPR-16188
2018-01-25 19:10:31 +01:00
Arjen Poutsma
0befc60c8f
Renamed DataBufferUtils/DataBufferFactory.compose to join
...
Issue: SPR-16365
2018-01-22 10:51:07 +01:00
sdeleuze
3f3141cdda
Add additional test for SPR-16210
...
Issue: SPR-16210
2018-01-22 10:29:21 +01:00
Juergen Hoeller
572c668726
Polishing
2018-01-19 21:30:37 +01:00
Arjen Poutsma
5520e730f1
DataBufferUtils.read should not take input stream/channel as parameter
...
Fixed by creating `Callable`-based variants, as explained in the JIRA
issue.
Issue: SPR-16403
2018-01-19 17:38:14 +01:00
Juergen Hoeller
4c7414833b
ResolvableType returns clone for cached state with original local source
...
Issue: SPR-16210
2018-01-19 12:30:03 +01:00
Juergen Hoeller
ea5f8f5a7c
Consistently handle NoClassDefFoundError in BeanUtils and related places
...
Issue: SPR-16369
2018-01-17 20:24:57 +01:00
Juergen Hoeller
4c9ed0d87e
Polishing
2018-01-12 18:24:00 +01:00
Juergen Hoeller
06e6386dc9
CollectionUtils.lastElement for common Set/List extraction
...
Issue: SPR-16374
2018-01-12 18:23:52 +01:00
Juergen Hoeller
347c2daa2c
Test for multiple interfaces at BridgeMethodResolver level
...
Issue: SPR-16288
2018-01-12 16:45:38 +01:00
Arjen Poutsma
67e7c784e8
Use DataBufferUtils.compose and remove writeAggregator
...
Use DataBufferUtils.compose instead of writeAggregator to combine
multiple data buffers into one, as the write aggregator would not work
when the initial data buffer did not have enough capacity to contain
all subsequent buffers.
Removed writeAggregator, as it is no longer needed.
Issue: SPR-16365
2018-01-12 10:36:09 +01:00
Arjen Poutsma
384a399fd2
Add DataBufferUtils.compose
...
Added a utility method that composes data buffers into a single buffer.
Depending on the `DataBuffer` implementation, the returned buffer may be
a single buffer containing all data of the provided buffers, or it may
be a true composite that contains references to the buffers.
Issue: SPR-16365
2018-01-12 10:36:09 +01:00
Juergen Hoeller
121f9e3734
BridgeMethodResolver properly resolves all declared interfaces
...
Issue: SPR-16288
2018-01-11 10:18:27 +01:00
Arjen Poutsma
5adaa1030c
Javadoc
2018-01-10 17:54:51 +01:00
Arjen Poutsma
8a129ef3da
Use write aggregator from DataBufferUtils
...
This commit uses the newly introduced write aggregator from
DataBufferUtils throughout WebFlux.
Issue: SPR-16351
2018-01-10 11:15:47 +01:00
Arjen Poutsma
69ccba30e9
Introduce write aggregator to DataBufferUtils
...
As a consequence of dropping CompositeByteBuf (see prior commit),
DataBuffers fluxes that are aggregated with Flux.reduce(BiFunction) are
now required to be released, as the composite no longer holds a
reference to subsequent data buffers.
For this purpose, DataBufferUtils now has a writeAggregator that can be
used with Flux.reduce, and that released the subsequent buffers
properly.
Issue: SPR-16351
2018-01-10 11:14:02 +01:00
Arjen Poutsma
e6893da971
Remove use of CompositeByteBuf in NettyDataBuffer
...
Prior to this commit, NettyDataBuffer had a optimization in
write(ByteBuf...), where it used a CompositeByteBuf to hold the original
and the parameter buffer.
Unfortunately, this procedure has nasty consequences when splicing
buffers (see https://stackoverflow.com/a/48111196/839733 ).
As of this commit, NettyDataBuffer stopped using CompositeByteBuf, and
simply does ByteBuf.write().
Issue: SPR-16351
2018-01-10 11:05:41 +01:00
Juergen Hoeller
45828cb934
Check BeanInfoFactory for interface introspection as well
...
Issue: SPR-16322
2018-01-08 18:05:02 +01:00
Juergen Hoeller
7ad69bfc20
Avoid extra existence check in SimpleMetadataReaderFactory
...
Issue: SPR-16281
2018-01-07 23:18:52 +01:00
Juergen Hoeller
1a154c3e4c
Consistently throw FileNotFoundException even for NIO access
...
Issue: SPR-16334
2018-01-07 23:18:28 +01:00
Rossen Stoyanchev
f4d8c7cc2b
Improve decodeToMono support
...
This commit ensures uniform support for decodeToMono across the various
byte and String related decoders.
Issue: SPR-16253
2017-12-14 16:59:34 -05:00
Christoph Dreis
260ebeca3a
Improve performance of some string operations
...
Issue: SPR-16293
2017-12-12 17:14:24 +01:00
Sam Brannen
767ea9db83
Fix minor logic error in SocketUtils
2017-12-06 17:00:29 -08:00
Tony Mitchell
9f36d170be
Support identical minPort and maxPort in SocketUtils ( #1612 )
...
This commit fixes a bug where an IllegalStateException was
thrown if the minPort and maxPort values supplied to
SocketUtils.findAvailableTcpPort(int, int) were identical.
2017-12-06 16:38:46 -08:00
Sam Brannen
f9689dfe48
Polishing
2017-12-06 15:54:02 -08:00
Sam Brannen
773cd3241b
Polishing
2017-11-28 14:11:21 +01:00
Juergen Hoeller
0cc644f61f
Polishing
2017-11-21 16:34:08 +01:00
sdeleuze
9f1d8517ba
Polish Kotlin source code style
2017-11-21 15:59:23 +01:00
Juergen Hoeller
5843173567
Polishing
2017-11-21 13:42:57 +01:00
jianglei
4b614dc1de
Fix copy/paste in Javadoc
...
Closes gh-1601
2017-11-21 06:58:14 +01:00
Rossen Stoyanchev
bc8e525e60
Add shared instance of ReactiveAdapterRegistry
...
Issue: SPR-16218
2017-11-20 17:02:22 -05:00
Juergen Hoeller
84699c8b9b
Document common use cases for @Order vs @Priority vs @DependsOn
...
Issue: SPR-16213
2017-11-20 12:53:37 +01:00
Arjen Poutsma
e4d405271a
Document DataBuffer/PooledDataBuffer and codecs
...
Issue: SPR-16156
2017-11-16 11:36:26 +01:00
diesieben07
0e49e32188
Handle parameters of Kotlin extension methods correctly
...
The EXTENSION_RECEIVER parameter of Kotlin's extension
methods appear as normal method parameters to Java and
thus require a name. The synthetic name "$receiver" is
used here, as it is not a valid Kotlin identifier,
but valid in Java.
Issue: SPR-16119
2017-11-13 15:42:32 +01:00
Sam Brannen
2be2aa7b96
Add missing word to JavaDoc
2017-11-13 00:46:20 +01:00
Arjen Poutsma
8223809455
Use existing CompositeByteBuf if possible
...
This commit uses the existing CompositeByteBuf if present, as opposed
to creating a new composite for every call to
NettyDataBuffer.write(ByteBuf...)
Issue: SPR-16180
2017-11-10 15:09:14 +01:00
Juergen Hoeller
9b7af8b5aa
Polishing
2017-11-05 21:07:26 +01:00
Juergen Hoeller
07b479e264
FileUrlResource creates same class from createRelative
...
Issue: SPR-16140
2017-11-05 21:01:29 +01:00
Juergen Hoeller
996d747aed
Upgrade to Mockito 2.11
...
Includes fixes for invalid exception declarations in Mockito-based unit tests. Also includes FreeMarker 2.3.27, Commons Pool 2.4.3, JSON-P 1.1.2.
Issue: SPR-16157
2017-11-04 01:06:59 +01:00
Juergen Hoeller
d00e4f17ec
ClassPathResource uses specific constructors in createRelative
...
Issue: SPR-16146
2017-11-02 16:05:57 +01:00
Juergen Hoeller
b921d564d2
DefaultResourceLoader resolves writable FileUrlResource for "file:" URL
...
Issue: SPR-16140
2017-11-02 16:05:40 +01:00
Juergen Hoeller
a2f5e1254e
Drive letter case alignment in addClassPathManifestEntries
...
Issue: SPR-16117
2017-10-26 15:28:27 +02:00
Juergen Hoeller
7e8c8f0b76
Polishing
2017-10-25 19:23:48 +02:00
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