Commit Graph

1402 Commits

Author SHA1 Message Date
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