-
Notifications
You must be signed in to change notification settings - Fork 164
Added handling for NAN in add method of DateTimeStamp #50
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
anantk24
commented
Aug 18, 2021
- When offsetInDecimalSeconds is NAN then it is considered as 0.0d
- DateTimeStamp API that takes double as an arg should handle NaN #49
- Defined hash code api - added null check and class check in equals api - Modified access modifiers according to JLS.
…ogs. - Updated command in maven github workflow. - Added default and contributor profile - Updated read me doc and contributing doc.
Minor edit for punctuation.
`mvn test` will still run, but does nothing. This would be surprising to anyone running this build. So I added back the `mvn test` line with some info about the contributor profile.
- When offsetInDecimalSeconds is NAN then it is considered as 0.0d
- When offsetInDecimalSeconds is NAN then it is considered as 0.0d
| @Test | ||
| void testNanWithNegativeAdd() { | ||
| DateTimeStamp dateTimeStamp = new DateTimeStamp("2018-04-04T10:09:59.586-0100"); | ||
| DateTimeStamp forComparing = new DateTimeStamp("2018-04-04T10:10:00.586-0100").add(-1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be minus(Double.NaN)?
|
Would you mind looking at all of the DateTimeStamp API that takes a double?
|
Yes sure will look for all api. |
…dded testcases for the same.
|
@anantk24 It's looking for a file DateTimeStampNaN which it can't find. Is this a file you created? If so, it was never pushed. |
It is the branch I have created , trying to create pull request from the same. |
|
It looks like the build script is trying to commit the badges to gctoolkit and not your fork, which I guess makes sense. Maybe there needs to be a different script for PRs that doesn't do the badging. Or maybe there is some config for the commit script that's missing. IDK. New territory for me. I need to investigate. |
|
@anantk24 - I pushed a fix for the badge commit. Please pull from gctoolkit/main |
@dsgrieve - Thanks for update. I was thinking on similar lines, opened discussion #52 for the same. Automatic badge update is available in markdown and through supported code analysis server. |
|
I'm not sure why this worked for my PR and not yours, unless it has to do with some mojo I have that you do not. Maybe committing the badge doesn't make sense for a PR build. But the git-auto-commit-action doc implies it should work for the PR. Maybe it's the detached head state of the checkout. Maybe the workaround is to have a separate PR workflow yaml. |
|
I just recreated the issue by checking out your pr, setting upstream to my fork, and then creating a PR from there (PR #57). The reason it happens on your branch and not others is that you added tests, thus changing the badge, resulting in an attempt to do the commit. The answer, I believe, lies somewhere in the |
|
Thanks again, @anantk24! |