Skip to content
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

ParameterizedTypeInformation.getMapValueType for non-map types causes StackOverflowError [DATACMNS-899] #1357

Closed
spring-projects-issues opened this issue Aug 24, 2016 · 1 comment
Assignees
Labels
type: bug

Comments

@spring-projects-issues
Copy link

@spring-projects-issues spring-projects-issues commented Aug 24, 2016

Blazej Adamczyk opened DATACMNS-899 and commented

I'm not sure but it seems there's a bug in ParameterizedTypeInformation.java at line 88: link github:ParameterizedTypeInformation.java.

It seems this function should return TypeInformation for a Map descendant. But if for some reason (I faced this in spring-data-mongodb) the method gets a non Map type it will return super.getMapValueType() which in turn again executes doGetMapValueType and finally we get a StackOverflowError.

Shouldn't the first if (at line 61) be spanned across whole the method to verify that we are working with Map at all?


Issue Links:

  • DATAMONGO-1479 MappingMongoConverter.convertToMongoType causes StackOverflowError for parameterized map value types

Referenced from: pull request #176, and commits e93db1d, 2b14d1e, 2664608, 8096d95, 09a2369

Backported to: 1.12.3 (Hopper SR3), 1.11.5 (Gosling SR5)

1 votes, 2 watchers

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Aug 25, 2016

Blazej Adamczyk commented

The probable bug in spring-data-mongodb which causes this StackOverflowError is described here: DATAMONGO-1479

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug
Projects
None yet
Development

No branches or pull requests

2 participants