Go to file
Brian Clozel 1b93ea97ac Fix concurrent reads issue in MimeTypeUtils cache
As of gh-22340, `MimeTypeUtils` has a built-in LRU cache implementation
for caching parsed MIME types and avoiding excessive garbage creation at
runtime.
This implementation, when hit with highly concurrent reads on the same
media type (the cache key), can create multiple keys for the same MIME
type string. This duplication leads to the cache filling up and evicting
entries. When the cache fetches a duplicate key, it is then not
associated with a value and the cache can return a `null` value, which
is forbidden by the API contract.

This commit adds another cache check within the write lock: this avoids
creating duplicate entries in the cache and `null` return values.

Fixes gh-23211
2019-06-28 23:43:38 +02:00
.github Add "Affects" field to issue template 2019-01-18 15:27:43 -05:00
buildSrc Polish URL Cleanup 2019-03-22 00:24:06 -05:00
gradle Upgrade Gradle to 5.4.1 2019-04-26 13:33:51 +02:00
spring-aop Fix typo 2019-06-17 11:40:45 +02:00
spring-aspects Migrate JUnit 4 assertions to AssertJ 2019-05-23 15:52:49 -07:00
spring-beans Polish YamlProcessorTests.flattenedMapIsSameAsPropertiesButOrdered() 2019-06-20 08:34:44 +02:00
spring-context Merge branch '5.1.x' 2019-06-25 13:14:21 +03:00
spring-context-indexer Remove use of @Nullable from copy of SortedProperties 2019-06-12 15:31:54 +03:00
spring-context-support Merge branch '5.1.x' 2019-06-22 17:11:31 +02:00
spring-core Fix concurrent reads issue in MimeTypeUtils cache 2019-06-28 23:43:38 +02:00
spring-core-coroutines Use explicit onErrorMap(class.java) instead of reactor kotlin extension 2019-05-06 16:45:01 -07:00
spring-expression Merge branch '5.1.x' 2019-06-12 18:16:30 +02:00
spring-framework-bom Remove dependency management noise from POMs 2018-06-11 15:57:54 +02:00
spring-instrument URL Cleanup 2019-03-21 23:49:28 -05:00
spring-jcl URL Cleanup 2019-03-21 23:49:28 -05:00
spring-jdbc Merge branch '5.1.x' 2019-06-12 14:14:40 +02:00
spring-jms Merge branch '5.1.x' 2019-06-12 18:16:30 +02:00
spring-messaging More flexible RSocket metadata support 2019-06-28 22:00:44 +01:00
spring-orm Upgrade to Tomcat 9.0.21, Undertow 2.0.21, RxJava 2.2.9, Checkstyle 8.21, Mockito 2.28.2, Hibernate ORM 5.4.3 2019-06-11 18:26:13 +02:00
spring-oxm Merge branch '5.1.x' 2019-06-12 14:14:40 +02:00
spring-test Merge branch '5.1.x' 2019-06-22 17:11:31 +02:00
spring-tx Merge branch '5.1.x' 2019-06-12 18:16:30 +02:00
spring-web Cache the encoded credentials in BasicAuthenticationInterceptor 2019-06-28 18:48:59 +03:00
spring-webflux Remove unnecessary import 2019-06-25 17:42:01 -07:00
spring-webmvc Presort beans in ControllerAdviceBean.findAnnotatedBeans() 2019-06-24 16:26:11 +03:00
spring-websocket Presort beans in ControllerAdviceBean.findAnnotatedBeans() 2019-06-24 16:26:11 +03:00
src Support multipart/* MediaTypes in RestTemplate 2019-06-28 17:13:18 +03:00
.editorconfig Add EditorConfig 2017-06-12 08:07:54 +02:00
.gitignore Reorganize spring-web-reactive .gitignore 2016-07-18 17:31:18 +02:00
.mailmap Change gopivotal.com to pivotal.io 2014-10-05 18:12:50 +02:00
CODE_OF_CONDUCT.adoc URL Cleanup 2019-03-21 15:08:55 -05:00
CONTRIBUTING.md Fix typo in CONTRIBUTING.md 2019-06-22 22:34:05 +03:00
README.md Wikipedia -> Wiki 2019-03-23 13:44:59 +01:00
SECURITY.md Create SECURITY.md 2019-05-23 11:36:52 -04:00
build.gradle Merge branch '5.1.x' 2019-06-22 17:11:31 +02:00
gradle.properties Switch master to 5.2.0.BUILD-SNAPSHOT 2019-01-09 14:12:05 +01:00
gradlew Upgrade to Gradle 5.3 2019-03-23 18:04:44 +01:00
gradlew.bat Upgrade to Gradle 5.3 2019-03-23 18:04:44 +01:00
import-into-eclipse.md URL Cleanup 2019-03-21 15:08:55 -05:00
import-into-idea.md URL Cleanup 2019-03-21 15:08:55 -05:00
settings.gradle Introduce spring-core-coroutines module 2019-03-25 21:57:53 +01:00

README.md

Spring Framework

This is the home of the Spring Framework: the foundation for all Spring projects. Collectively the Spring Framework and the family of Spring projects is often referred to simply as "Spring".

Spring provides everything required beyond the Java programming language for creating enterprise applications for a wide range of scenarios and architectures. Please read the Overview section as reference for a more complete introduction.

Code of Conduct

This project is governed by the Spring Code of Conduct. By participating, you are expected to uphold this code of conduct. Please report unacceptable behavior to spring-code-of-conduct@pivotal.io.

Access to Binaries

For access to artifacts or a distribution zip, see the Spring Framework Artifacts wiki page.

Documentation

The Spring Framework maintains reference documentation (published and source), Github wiki pages, and an API reference. There are also guides and tutorials across Spring projects.

Build from Source

See the Build from Source Wiki page and the CONTRIBUTING.md file.

Stay in Touch

Follow @SpringCentral, @SpringFramework, and its team members on Twitter. In-depth articles can be found at The Spring Blog, and releases are announced via our news feed.

License

The Spring Framework is released under version 2.0 of the Apache License.