Commit Graph

2181 Commits

Author SHA1 Message Date
Qimiao Chen
7c831d2ef4 Replace anonymous inner classes with lambdas in tests
Closes gh-24808
2020-03-30 12:02:23 +02:00
Rossen Stoyanchev
3175f0771e Remove dumpString from DataBufferTestUtils
See gh-24786
2020-03-26 21:42:12 +00:00
Rossen Stoyanchev
7aa06b8610 Polishing contribution
See gh-24786
2020-03-26 21:42:12 +00:00
Сергей Цыпанов
f17b0125ff Simplify conversion of DataBuffer to String
See gh-24786
2020-03-26 21:42:12 +00:00
Juergen Hoeller
593a2ade91 Expose context class for interface-based CGLIB proxies as well
Closes gh-24657
2020-03-26 17:30:37 +01:00
Sam Brannen
6222efc54b Polish contribution
See gh-24785
2020-03-26 16:52:24 +01:00
Сергей Цыпанов
65aa2d03f0 Simplify conversion of ByteArrayOutputStream to String
Closes gh-24785
2020-03-26 16:52:14 +01:00
Brian Clozel
d97eabba2f Do not cache multipart MIME types in cache
Prior to this commmit, "mutipart/*" MIME types would be cached by the
`MimeTypeUtils` LRU cache. Since those MIME types are likely to have
random boundaries in them, they can waste space in the LRU cache.
This is not improving things since we're parsing them anyway.

This commit skips the caching step for all "multipart" MIME types.

Fixes gh-24767
2020-03-24 10:59:05 +01:00
Juergen Hoeller
2209e7cb92 Reuse empty class array constant in ClassUtils
Closes gh-24221
2020-03-24 00:08:43 +01:00
Christoph Dreis
1c6dda3ca4 Improve performance of StringUtils#cleanPath 2020-03-23 23:25:15 +01:00
Juergen Hoeller
2e23cf32ce Clarify name generation responsibility for PropertySourceFactory impls
Closes gh-24757
2020-03-23 18:02:05 +01:00
Juergen Hoeller
10d47d4d21 Enable ASM8_EXPERIMENTAL for Java 14 record support
Closes gh-24722
2020-03-23 18:00:59 +01:00
Brian Clozel
831a95154e Polish ConcurrentLruCache
This commit improves the performance of the `ConcurrentLruCache` and
applies a consistent style to the code:

* separating read/write locks into different variables does not help
performance, so this change is reverted
* apply a consistent style for read/write locks and try/cactch calls
* the reordering of recently used keys is only done when the cache is
full

Fixes gh-24671
2020-03-22 21:49:07 +01:00
Kwangyong Kim
713a112812 Improve ConcurrentLruCache performance
- manage collection size manually
- check cache hit first before size check
- reduce read-lock scope
- use `map.get` to test cache instead of `queue.remove`

Closes gh-24469
See gh-24671
2020-03-22 21:48:55 +01:00
Qimiao Chen
09b36380cd Fix typos in source files
Closes gh-24746
2020-03-20 20:06:52 +01:00
Sam Brannen
116a256e81 Fix typos in AnnotationsScannerTests 2020-03-20 15:03:01 +01:00
Qimiao Chen
2c5781473c Improve Javadoc in AnnotatedElementUtils
Closes gh-24740
2020-03-20 15:00:17 +01:00
Qimiao Chen
d85a6c0bea Fix typos in MergedAnnotationsCollectionTests
Closes gh-24701
2020-03-15 11:48:29 +01:00
陈其苗
c5b8406def Add some test cases in StringUtilsTests 2020-03-13 12:35:04 +00:00
陈其苗
6013591fac Polish containsAny of CollectionUtils by reusing findFirstMatch 2020-03-13 12:32:43 +00:00
Juergen Hoeller
7f26e8cfc6 Short-circuit interface visibility check in case of same ClassLoader
Closes gh-24664
2020-03-11 14:55:08 +01:00
Sam Brannen
787b09b202 Relax GraalVM check in DefaultParameterNameDiscoverer
Prior to this commit, DefaultParameterNameDiscoverer did not register
any discovers when compiling or running as a GraalVM native image.

This commit relaxes the GraalVM check so that it is only applied to the
registration of KotlinReflectionParameterNameDiscoverer.

Consequently, StandardReflectionParameterNameDiscoverer and
LocalVariableTableParameterNameDiscoverer are once again always
registered by DefaultParameterNameDiscoverer.

Closes gh-24600
2020-02-26 14:18:56 +01:00
Rossen Stoyanchev
2f12351292 Refine BlockHound support
- disable for Java 14/15 for now until BlockHound support
- targeted installation of required integrations only
2020-02-25 10:07:29 +00:00
Rossen Stoyanchev
2ae91404d1 BlockHoundIntegration for spring-core 2020-02-24 17:19:32 +00:00
Sam Brannen
7778508e69 Fix typos in ResolvableTypeTests
See gh-24529

Co-authored-by: Qimiao Chen <chenqimiao1994@126.com>
2020-02-24 15:37:42 +01:00
Sam Brannen
d1a6e49475 Reset SecurityManager in finally-block and polish 2020-02-23 18:33:56 +01:00
Sam Brannen
809ed9d469 Rename PropertyResolverExtensionsTests to Kotlin* 2020-02-23 18:21:53 +01:00
Qimiao Chen
f78c21e40b Fix typos in tests
Closes gh-24566
2020-02-22 18:32:02 +01:00
Sam Brannen
8ff1ac59e0 Polishing 2020-02-19 11:29:51 +01:00
Rossen Stoyanchev
87f866b688 Update DigestUtils Javadoc with regards to InputStream
Closes gh-24534
2020-02-18 19:56:25 +00:00
Sam Brannen
5d4f1d9e09 Extract ValueExtractor functional interface
See gh-24375
2020-02-12 10:49:36 +01:00
Sam Brannen
974cacac31 Support nested annotations in ASM-based processing again
Spring Framework 5.0 introduced a regression in ASM-based annotation
processing. Specifically, nested annotations were no longer supported,
and component scanning resulted in an exception if a candidate
component was annotated with an annotation that contained nested
annotations.

This commit fixes this regression by introducing special handling in
AnnotationTypeMapping that supports extracting values from objects of
type TypeMappedAnnotation when necessary.

Closes gh-24375
2020-02-12 10:36:54 +01:00
Rossen Stoyanchev
d552105516 Eliminate windowUntil from StringDecoder
This is a follow-up on the earlier commit
28a95e89f3 eliminating windowUntil
entirely which generates a BubblingException wrapper. This also keeps
the chain a little simpler.

See gh-24355
2020-02-11 16:49:21 +00:00
Rossen Stoyanchev
28a95e89f3 Upgrade to Dysprosium SR5 snapshots
See gh-24355
2020-02-11 12:52:04 +00:00
Rossen Stoyanchev
7d1d989535 Minor polishing in ConcurrentReferenceHashMap
Closes gh-24494
2020-02-11 10:49:28 +00:00
Rossen Stoyanchev
e4a530efac Minor refactoring in CommonsLogWriter
Closes gh-24495
2020-02-11 10:40:24 +00:00
Rossen Stoyanchev
df706f4c7c Restore use of Flux-based encode method in HTTP
Closes gh-24441
2020-02-07 21:44:44 +00:00
Sam Brannen
2b6117c0c2 Fix Checkstyle violation
See gh-24393
2020-02-04 13:45:02 +01:00
Sam Brannen
72685b1d81 Polish contribution
See gh-24393
2020-02-04 13:41:31 +01:00
Hyunjin Choi
d624dc084f Add close() method in FileCopyUtils to reduce duplication
Closes gh-24393
2020-02-04 13:36:24 +01:00
Hyunjin Choi
550f13e8ed Simplify GenericConversionService.getMatchableConverters()
Closes gh-24403
2020-02-04 12:59:57 +01:00
Rossen Stoyanchev
f5df422de9 Polishing contribution
See gh-24470
2020-02-03 20:32:36 +00:00
Hyunjin Choi
273812f9c5 Remove unnecessary escapes in regular expressions
See gh-24470
2020-02-03 20:22:40 +00:00
Sam Brannen
cf9a052e3a Polish contribution
See gh-24428
2020-02-03 15:39:00 +01:00
Hyunjin Choi
1b39f138eb Test ObjectUtils.containsElement()
This commit introduces a unit test for the containsElement() method
in ObjectUtils.

Closes gh-24428
2020-02-03 15:34:47 +01:00
Hyunjin Choi
14a32d13d0 Fix typo in StringUtils class
Closes gh-24471
2020-02-03 15:23:32 +01:00
Sam Brannen
d77a28aac3 Support optional command line arguments with empty values
Spring Framework provides two implementations of the
CommandLinePropertySource API: SimpleCommandLinePropertySource and
JOptCommandLinePropertySource.

Prior to this commit, JOptCommandLinePropertySource supported empty
values for optional arguments; whereas, SimpleCommandLinePropertySource
did not.

This commit modifies the implementation of SimpleCommandLinePropertySource
to allow empty values for optional arguments.

Closes gh-24464
2020-02-03 15:03:43 +01:00
Sam Brannen
daebbf1960 Polishing 2020-01-31 14:34:50 +01:00
Сергей Цыпанов
64440a5f04 Some trivial improvements to reduce allocation pressure
Closes gh-24447
2020-01-28 11:07:40 +01:00
Juergen Hoeller
75abd9fc7e Upgrade to ASM 7.3
Closes gh-24438
2020-01-27 18:18:16 +01:00