fix bug: mapping from msgpack response to int, Integer, long, Long types works fine
All of the unit tests of the InfluxDBResultMapper is based on the assumption that all numbers in response from influxd is Double. It will be ok with JSON. But msgpack format is more precise.
So, InfluxDBResultMapper have errors. For example, it throws an exception when mapping number to int, Integer, long, Long types from msgpack responses, but works with json.
This PR fix it (with unit test).
Nice catch, one small formatting nit:
[ERROR] /usr/src/mymaven/src/main/java/org/influxdb/impl/InfluxDBResultMapper.java:364:37: 'typecast' is not followed by whitespace. [WhitespaceAfter]
[ERROR] /usr/src/mymaven/src/main/java/org/influxdb/impl/InfluxDBResultMapper.java:385:33: 'typecast' is not followed by whitespace. [WhitespaceAfter]
[ERROR] /usr/src/mymaven/src/main/java/org/influxdb/impl/InfluxDBResultMapper.java:389:33: 'typecast' is not followed by whitespace. [WhitespaceAfter]
Codecov Report
Merging #671 into master will not change coverage by
%. The diff coverage is100.00%.
@@ Coverage Diff @@
## master #671 +/- ##
=========================================
Coverage 88.18% 88.18%
Complexity 722 722
=========================================
Files 69 69
Lines 2513 2513
Branches 268 268
=========================================
Hits 2216 2216
Misses 208 208
Partials 89 89
| Impacted Files | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| ...n/java/org/influxdb/impl/InfluxDBResultMapper.java | 88.81% <100.00%> (ø) |
57.00 <0.00> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update b3367fd...059089b. Read the comment docs.
I'm reviewing this PR. Please, do not merge.
Did anything ever happen with this one?
What is a progress on this?
Hi @fmachado, any update on this PR?
I think he stopped working on this a long time ago. That's left a lot of PRs unmerged and most have likely gone to the influxdb-client-java repo.