-
Notifications
You must be signed in to change notification settings - Fork 38.9k
ResolvableType.getNested typeProvider was missing #36104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Improve Javadoc. - Suppress warnings for "removal". - Update copyright headers. - Migrate several tests from: - MappingJackson2MessageConverter to JacksonJsonMessageConverter - Jackson2JsonEncoder to JacksonJsonEncoder - Jackson2JsonDecoder to JacksonJsonDecoder - Jackson2SmileEncoder to JacksonSmileEncoder - Jackson2ObjectMapperBuilder to JsonMapper and XmlMapper - MappingJackson2JsonView to JacksonJsonView - MappingJackson2HttpMessageConverter to JacksonJsonHttpMessageConverter - MappingJackson2XmlHttpMessageConverter to JacksonXmlHttpMessageConverter
|
@TAKETODAY please sign your commit; no need to close/create a new PR, you can do this with: |
…g, causing JacksonJsonHttpMessageConverter's contextClass to resolve to null Signed-off-by: 海子 Yang <i.take.today@gmail.com>
Closes spring-projectsgh-36105 Signed-off-by: 海子 Yang <i.take.today@gmail.com>
See spring-projectsgh-36105 See spring-projectsgh-36099 Signed-off-by: 海子 Yang <i.take.today@gmail.com>
…s missing, causing JacksonJsonHttpMessageConverter's contextClass to resolve to null" This reverts commit 2c5ba24. Signed-off-by: 海子 Yang <i.take.today@gmail.com>
… of the owner This is a change to a core library, and it's a very cautious commit. Therefore, this commit reverses the previous getGenerics modification, as getGenerics has a significant impact scope. Signed-off-by: 海子 Yang <i.take.today@gmail.com>
|
Thanks for this PR, we are going to fix this but I tend to think it will be better (less risk of regression due to the changes on utility methods, more robust) to handle that using |
OK,Thank you for your reply. |
This causes JacksonJsonHttpMessageConverter.read() 's contextClass to resolve to null
Because the
MappingJackson2HttpMessageConverteris aGenericHttpMessageConverterthat explicitly provides thecontextClassduring reading, whereas theJacksonJsonHttpMessageConverterobtains it through(ResolvableType.getSource() as MethodParameter).getContainingClass.spring-framework/spring-web/src/main/java/org/springframework/http/converter/GenericHttpMessageConverter.java
Lines 69 to 71 in 253eb28
but type.getSource() is not instanceof MethodParameter
spring-framework/spring-web/src/main/java/org/springframework/http/converter/AbstractJacksonHttpMessageConverter.java
Lines 311 to 320 in 253eb28
spring-framework/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/HttpEntityMethodProcessorTests.java
Lines 154 to 176 in 253eb28