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 int type transformed as BigDecimal value when parsing as Map #529

Merged
merged 4 commits into from
Mar 26, 2019
Merged

Fix int type transformed as BigDecimal value when parsing as Map #529

merged 4 commits into from
Mar 26, 2019

Conversation

ebuildy
Copy link
Contributor

@ebuildy ebuildy commented Nov 21, 2018

Using with Jackson2 parser, a simple parsing of { "data" : 1} gives a BigDecimal instead an integer. In my case, valueClass is Object, but the JSON current token is VALUE_NUMBER_INT not FLOAT.

I parse as a Map. No problem if I parse as a class with "int" type.

@ebuildy ebuildy requested a review from a team as a code owner November 21, 2018 21:30
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

@googlebot googlebot added the cla: no This human has *not* signed the Contributor License Agreement. label Nov 21, 2018
@ebuildy
Copy link
Contributor Author

ebuildy commented Nov 21, 2018

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

@googlebot googlebot added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Nov 21, 2018
@ebuildy ebuildy changed the title Fix int type transformed as BigDecimal value Fix int type transformed as BigDecimal value when parsing as Map Nov 22, 2018
Copy link
Collaborator

@chingor13 chingor13 left a comment

Choose a reason for hiding this comment

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

Thanks for submitting this and sorry for the delay in reviewing it. Can you add a unit test for this?

@chingor13 chingor13 self-assigned this Dec 28, 2018
@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Feb 7, 2019
@sduskis
Copy link
Contributor

sduskis commented Feb 10, 2019

@ebuildy, can you please add a unit test for this change?

@ebuildy
Copy link
Contributor Author

ebuildy commented Feb 10, 2019

Sure I will this week, thanks you.

@sduskis sduskis added status: blocked Resolving the issue is dependent on other work. and removed 🚨 This issue needs some love. labels Feb 11, 2019
@sduskis
Copy link
Contributor

sduskis commented Feb 26, 2019

@ajaaym, this needs a unit test. Can you please get someone to resubmit this with a unit test?

@ajaaym
Copy link
Contributor

ajaaym commented Feb 26, 2019

@sduskis yes

@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of all the commit author(s), set the cla label to yes (if enabled on your project), and then merge this pull request when appropriate.

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: no This human has *not* signed the Contributor License Agreement. and removed cla: yes This human has signed the Contributor License Agreement. labels Feb 26, 2019
@pmakani
Copy link
Contributor

pmakani commented Feb 28, 2019

@sduskis unit test added, PTAL.

@sduskis sduskis added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Feb 28, 2019
import java.util.Map;
import java.util.Set;
import java.util.WeakHashMap;
import java.util.*;
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use IDE settings that do not use * but rather use individual imports.

@sduskis sduskis added kokoro:force-run Add this label to force Kokoro to re-run the tests. and removed status: blocked Resolving the issue is dependent on other work. labels Feb 28, 2019
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 28, 2019
@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Feb 28, 2019
@sduskis
Copy link
Contributor

sduskis commented Feb 28, 2019

@pmakani, there are a lot of formatting changes here. Please raise a separate PR for just the formatting changes.

@pmakani
Copy link
Contributor

pmakani commented Mar 19, 2019

@pmakani, there are a lot of formatting changes here. Please raise a separate PR for just the formatting changes.

PR #619

ebuildy and others added 4 commits March 19, 2019 19:22
Using with Jackson2 parser,  a simple parsing of { "data" : 1} gives a BigDecimal instead an integer. In my case, ``valueClass`` is Object, but the JSON current token is VALUE_NUMBER_INT not FLOAT.
@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of all the commit author(s), set the cla label to yes (if enabled on your project), and then merge this pull request when appropriate.

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: no This human has *not* signed the Contributor License Agreement. and removed cla: yes This human has signed the Contributor License Agreement. labels Mar 19, 2019
@sduskis sduskis added kokoro:force-run Add this label to force Kokoro to re-run the tests. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Mar 25, 2019
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 25, 2019
@sduskis sduskis added the cla: yes This human has signed the Contributor License Agreement. label Mar 26, 2019
@googlebot
Copy link

A Googler has manually verified that the CLAs look good.

(Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.)

ℹ️ Googlers: Go here for more info.

@sduskis sduskis added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 26, 2019
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 26, 2019
@sduskis sduskis dismissed chingor13’s stale review March 26, 2019 16:10

The comment was addressed.

@sduskis sduskis merged commit da597e8 into googleapis:master Mar 26, 2019
@chingor13
Copy link
Collaborator

Turns out this behavior change is breaking a bunch of internal customers.

chingor13 added a commit to chingor13/google-http-java-client that referenced this pull request May 31, 2019
chingor13 added a commit that referenced this pull request Jun 3, 2019
chingor13 added a commit that referenced this pull request Jun 3, 2019
clundin25 pushed a commit to clundin25/google-http-java-client that referenced this pull request Aug 11, 2022
* per google style, logger is lower case

* format
clundin25 pushed a commit to clundin25/google-http-java-client that referenced this pull request Aug 11, 2022
🤖 I have created a release \*beep\* \*boop\* 
---
## [0.23.0](https://www.github.com/googleapis/google-auth-library-java/compare/v0.22.2...v0.23.0) (2021-01-26)


### ⚠ BREAKING CHANGES

* privatize deprecated constructor (googleapis#473)

### Features

* allow custom lifespan for impersonated creds ([googleapis#515](https://www.github.com/googleapis/google-auth-library-java/issues/515)) ([0707ed4](https://www.github.com/googleapis/google-auth-library-java/commit/0707ed4bbb40fb775f196004ee30f8c695fe662b))
* allow custom scopes for compute engine creds ([googleapis#514](https://www.github.com/googleapis/google-auth-library-java/issues/514)) ([edc8d6e](https://www.github.com/googleapis/google-auth-library-java/commit/edc8d6e0e7ca2c6749d026ba42854a09c4879fd6))
* allow set lifetime for service account creds ([googleapis#516](https://www.github.com/googleapis/google-auth-library-java/issues/516)) ([427f2d5](https://www.github.com/googleapis/google-auth-library-java/commit/427f2d5610f0e8184a21b24531d2549a68c0b546))
* promote IdToken and JWT features ([googleapis#538](https://www.github.com/googleapis/google-auth-library-java/issues/538)) ([b514fe0](https://www.github.com/googleapis/google-auth-library-java/commit/b514fe0cebe5a294e0cf97b7b5349e6a523dc7b2))


### Bug Fixes

* per google style, logger is lower case ([googleapis#529](https://www.github.com/googleapis/google-auth-library-java/issues/529)) ([ecfc6a2](https://www.github.com/googleapis/google-auth-library-java/commit/ecfc6a2ea6060e06629b5d422b23b842b917f55e))
* privatize deprecated constructor ([googleapis#473](https://www.github.com/googleapis/google-auth-library-java/issues/473)) ([5804ff0](https://www.github.com/googleapis/google-auth-library-java/commit/5804ff03a531268831ac797ab262638a3119c14f))
* remove deprecated methods ([googleapis#537](https://www.github.com/googleapis/google-auth-library-java/issues/537)) ([427963e](https://www.github.com/googleapis/google-auth-library-java/commit/427963e04702d8b73eca5ed555539b11bbe97342))
* replace non-precondition use of Preconditions ([googleapis#539](https://www.github.com/googleapis/google-auth-library-java/issues/539)) ([f2ab4f1](https://www.github.com/googleapis/google-auth-library-java/commit/f2ab4f14262d54de0fde85494cfd92cf01a30cbe))
* switch to GSON ([googleapis#531](https://www.github.com/googleapis/google-auth-library-java/issues/531)) ([1b98d5c](https://www.github.com/googleapis/google-auth-library-java/commit/1b98d5c86fc5e56187c977e7f43c39bb62483d40))
* use default timeout if given 0 for ImpersonatedCredentials ([googleapis#527](https://www.github.com/googleapis/google-auth-library-java/issues/527)) ([ec74870](https://www.github.com/googleapis/google-auth-library-java/commit/ec74870c372a33d4157b45bb5d59ad7464fb2238))


### Dependencies

* update dependency com.google.appengine:appengine-api-1.0-sdk to v1.9.84 ([googleapis#422](https://www.github.com/googleapis/google-auth-library-java/issues/422)) ([b262c45](https://www.github.com/googleapis/google-auth-library-java/commit/b262c4587b058e6837429ee05f1b6a63620ee598))
* update dependency com.google.guava:guava to v30.1-android ([googleapis#522](https://www.github.com/googleapis/google-auth-library-java/issues/522)) ([4090d1c](https://www.github.com/googleapis/google-auth-library-java/commit/4090d1cb50041bceb1cd975d1a9249a412df936f))


### Documentation

* fix wording in jwtWithClaims Javadoc ([googleapis#536](https://www.github.com/googleapis/google-auth-library-java/issues/536)) ([af21727](https://www.github.com/googleapis/google-auth-library-java/commit/af21727815263fb5ffc07ede953cf042fac3ac2b))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement. 🚨 This issue needs some love.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants