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

MongodbSerializer unnecessarily calls getKeyForPath(…) #81

Closed
odrotbohm opened this issue Jan 12, 2012 · 1 comment
Closed

MongodbSerializer unnecessarily calls getKeyForPath(…) #81

odrotbohm opened this issue Jan 12, 2012 · 1 comment

Comments

@odrotbohm
Copy link

As stated in a Spring Data forum post MongodbSerializer recursively calls visit(…) for any() path types passing an empty expression to the call. This results in getKeyForPath(…) being called with an empty expression which is actually not necessary as looking up a key for no expression hardly makes sense. Beyond that, potential subclasses have to deal with that case explicitly which complicates the implementation.

Long story short, the call to getKeyForPath(…) can be delayed into the else clause, avoiding that obsolete call.

timowest added a commit that referenced this issue Jan 12, 2012
@timowest
Copy link
Member

timowest commented Feb 7, 2012

released in 2.3.1

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

No branches or pull requests

2 participants