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

fix: fix invalid values when receiving int2, int4, int8 via getBigDecimal() #426

Merged
merged 2 commits into from Nov 13, 2015

Conversation

@vlsi
Copy link
Member

@vlsi vlsi commented Nov 13, 2015

It turns out BigDecimal.valueOf(12, 1) == "12.1" while BigDecimal.valueOf(12).setScale(1) == "12.0"

vlsi added 2 commits Nov 13, 2015
…imal()

It turns out BigDecimal.valueOf(12, 1) == "12.1" while BigDecimal.valueOf(12).setScale(1) == "12.0"

fixes #424
@vlsi vlsi force-pushed the Gordiychuk:fix_bigint branch from 93edb10 to e6f1beb Nov 13, 2015
davecramer added a commit that referenced this pull request Nov 13, 2015
fix: fix invalid values when receiving int2, int4, int8 via getBigDecimal()
@davecramer davecramer merged commit fad7f52 into pgjdbc:master Nov 13, 2015
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@davecramer
Copy link
Member

@davecramer davecramer commented Nov 13, 2015

Thanks for the quick fix!

Dave Cramer

On 13 November 2015 at 17:15, Vladimir Sitnikov notifications@github.com
wrote:

It turns out BigDecimal.valueOf(12, 1) == "12.1" while BigDecimal.valueOf(12).setScale(1)
== "12.0"

Added new property to configure rounding mode for setScale: roundingMode

that defaults to HALF_EVEN

You can view, comment on, or merge this pull request online at:

#426
Commit Summary

  • test: add tests for getBigDecimal of int4 field in both text and
    binary modes
  • fix: fix invalid values when receiving int2, int4, int8 via
    getBigDecimal()

File Changes

Patch Links:


Reply to this email directly or view it on GitHub
#426.

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

Successfully merging this pull request may close these issues.

None yet

2 participants