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

Use recursively determined fieldSerializer when looking up field update serializers. #99

Conversation

tbartley
Copy link
Contributor

Use recursively determined fieldSerializer when looking up field update serializers. Closes #98.

@devbliss-jenkins
Copy link

Can one of the admins verify this patch?

@benmccann
Copy link
Contributor

Thanks @tbartley! Could you add a test for this fix before we merge?

@tbartley
Copy link
Contributor Author

No problem. Will do.

Sent from my iPhone

On 17 Mar 2015, at 8:04 am, Ben McCann <notifications@github.commailto:notifications@github.com> wrote:

Thanks @tbartleyhttps://github.com/tbartley! Could you add a test for this fix before we merge?

Reply to this email directly or view it on GitHubhttps://github.com//pull/99#issuecomment-81961785.

@tbartley
Copy link
Contributor Author

Unit test is now there.

}
public String _id = "id";
public Inner inner = new Inner();
public long timestamp;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicate space after long

@tbartley
Copy link
Contributor Author

Thanks for the comments @benmccann - how does that look now?

@benmccann
Copy link
Contributor

@tbartley thanks! this PR is looking really good! a couple last minor comments...


Calendar cal = Calendar.getInstance();
cal.set(0, 0, 0, 0, 0, 10);
Date d_1 = cal.getTime();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_ is kind of uncommon in Java naming. I'd probably just call them d1 and d2

@tbartley
Copy link
Contributor Author

Thanks again. Went with 'original' oveer 'obj' since that's a clearer meaning and makes sense in the comparison. And I've removed the underscores.


Calendar cal = Calendar.getInstance();
cal.set(0, 0, 0, 0, 0, 10);
Date d1 = cal.getTime();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if you just did:

Date d1 = new Date(10_000l);

It doesn't really matter what the date is and that'd be fewer lines of code, which I think makes the test more readable

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed - something made me think there wasn't a Date(long) constructor.

@benmccann
Copy link
Contributor

Looks great! Sorry, just one last comment. And also, do you mind squashing the commits?

@tbartley tbartley force-pushed the bug/98-class-cast-exception-on-update-serialization branch from 147904d to b11ea06 Compare March 19, 2015 04:22
@tbartley
Copy link
Contributor Author

Done.

benmccann added a commit that referenced this pull request Mar 19, 2015
…pdate-serialization

Use recursively determined fieldSerializer when looking up field update serializers.
@benmccann benmccann merged commit 4ee22d3 into mongojack:master Mar 19, 2015
@tbartley tbartley deleted the bug/98-class-cast-exception-on-update-serialization branch March 19, 2015 04:54
@tbartley tbartley restored the bug/98-class-cast-exception-on-update-serialization branch May 29, 2019 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants