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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a test to actually round trip an entity using BigDecimal #1095

Closed
wants to merge 1 commit into from

Conversation

evanchooly
Copy link
Member

馃う

fixes #1093

Copy link

@rozza rozza left a comment

Choose a reason for hiding this comment

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

A couple of comments

@@ -25,7 +25,7 @@
/**
* This provides a conversion to/from BigDecimal in applications using the Decimal128 type introduced in the 3.4.0 release of MongoDB. This
* converter also supports loading certain types of values from the database and converting them to BigDecimal.
*
* <p>
Copy link

Choose a reason for hiding this comment

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

Nit: unclosed tag - I think javadoc will complain

Copy link
Member Author

Choose a reason for hiding this comment

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

nope. no complaints.

Copy link

Choose a reason for hiding this comment

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

Ah I remember its Java 8 doclint that will complain, so it depends on which version you are using to build the javadoc and / or you have disabled doclint.


import static java.lang.String.format;

class ConverterTest<F, T> {
class ConverterTest<F, T> extends TestBase {
Copy link

Choose a reason for hiding this comment

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

You probably should also add round trip test cases for your other ConverterTests to prevent future regressions.

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@jyemin jyemin left a comment

Choose a reason for hiding this comment

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

Please also change the commit comment to reflect the bug fix, which is more salient than the test.

/**
* Creates the Converter.
*/
public BigDecimalConverter() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's unit test this constructor, and other similar converters.

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll update the commit message on the merge commit...

@evanchooly
Copy link
Member Author

Good to merge?

@jyemin
Copy link
Contributor

jyemin commented Dec 9, 2016

LGTM

@evanchooly evanchooly closed this in 08dd063 Dec 9, 2016
evanchooly pushed a commit that referenced this pull request Dec 9, 2016
@evanchooly evanchooly deleted the issue1093 branch December 9, 2016 15:26
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

Successfully merging this pull request may close these issues.

BigDecimal conversion problem - morphia 1.3 - MongoDB 3.4
3 participants