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
Removed Jackson dependency #508
Conversation
Codecov Report
@@ Coverage Diff @@
## master #508 +/- ##
============================================
- Coverage 74.09% 74.06% -0.03%
+ Complexity 1117 1116 -1
============================================
Files 66 66
Lines 5883 5884 +1
Branches 723 724 +1
============================================
- Hits 4359 4358 -1
Misses 1296 1296
- Partials 228 230 +2
Continue to review full report at Codecov.
|
google-cloud-firestore/src/test/java/com/google/cloud/firestore/LocalFirestoreHelper.java
Outdated
Show resolved
Hide resolved
e69bb7a
to
1c298f2
Compare
google-cloud-firestore/src/test/java/com/google/cloud/firestore/MapperTest.java
Outdated
Show resolved
Hide resolved
c544d7c
to
2a17f76
Compare
google-cloud-firestore/src/test/java/com/google/cloud/firestore/LocalFirestoreHelper.java
Outdated
Show resolved
Hide resolved
google-cloud-firestore/src/test/java/com/google/cloud/firestore/LocalFirestoreHelper.java
Outdated
Show resolved
Hide resolved
google-cloud-firestore/src/test/java/com/google/cloud/firestore/MapperTest.java
Outdated
Show resolved
Hide resolved
google-cloud-firestore/src/test/java/com/google/cloud/firestore/MapperTest.java
Outdated
Show resolved
Hide resolved
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.
Another approach for this PR would be to simply drop the JSON parsing from the callsites. The JSON parser is only used in the Unit tests and it seems straightforward to replace its usage. Instead of:
@Test
public void primitiveDeserializeString() {
StringBean bean = deserialize("{'value': 'foo'}", StringBean.class);
assertEquals("foo", bean.value);
...
We could just do:
@Test
public void primitiveDeserializeString() {
StringBean bean = deserialize(map("value", "foo"), StringBean.class); //
assertEquals("foo", bean.value);
private static <T> T deserialize(Map<String, Object> value, Class<T> clazz) ...
deserialize
could also be:
private static <T> T deserialize(Class<T> clazz, String key, Object value, Object ... moreKeysAndValues) ...
Which would make the callsites even more concise.
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
0ecbedb
to
7d5c72f
Compare
02cce3c
to
f77c7da
Compare
@googlebot I fixed it. |
google-cloud-firestore/src/test/java/com/google/cloud/firestore/MapperTest.java
Outdated
Show resolved
Hide resolved
google-cloud-firestore/src/test/java/com/google/cloud/firestore/MapperTest.java
Outdated
Show resolved
Hide resolved
9824050
to
b27f772
Compare
b27f772
to
7585b9d
Compare
🤖 I have created a release \*beep\* \*boop\* --- ### [2.2.6](https://www.github.com/googleapis/java-firestore/compare/v2.2.5...v2.2.6) (2021-04-13) ### Bug Fixes * Removed Jackson dependency ([#508](https://www.github.com/googleapis/java-firestore/issues/508)) ([7ada73d](https://www.github.com/googleapis/java-firestore/commit/7ada73d3c0a282be8ce2682c2e9c737690d9f891)) * typo ([#587](https://www.github.com/googleapis/java-firestore/issues/587)) ([520ac44](https://www.github.com/googleapis/java-firestore/commit/520ac441bcb7944be378ec6099b9ec4de37844d4)) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v0.21.0 ([#584](https://www.github.com/googleapis/java-firestore/issues/584)) ([c83a222](https://www.github.com/googleapis/java-firestore/commit/c83a222bd602a489552276c5202796db7fadeffa)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Signed-off-by: Abhijeet Shukla abhijeetshuklaoist@gmail.com
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #506 ☕️