openthread / ot-commissioner

OpenThread Commissioner, a Thread commissioner for joining new Thread devices and managing Thread networks.
https://openthread.io/
BSD 3-Clause "New" or "Revised" License
52 stars 35 forks source link

[swig] map Java byte to uin8_t for only the ByteArray class #151

Closed wgtdkp closed 4 years ago

wgtdkp commented 4 years ago

This PR helps SWIG to map Java byte to/from C++ uint8_t when it is used for std::vector<uint8_t>.

SWIG by default maps Java short to/from C++ uint8_t because Java byte is a signed integer that cannot hold all values of uint8_t. But when it comes to a byte array, it doesn't matter whether it is signed or unsigned and we'd like to map uint8_t to/from Java byte because they have the same width.

The CHIP PR https://github.com/project-chip/connectedhomeip/pull/2492 depends on this (see the discussion).

codecov-io commented 4 years ago

Codecov Report

Merging #151 into master will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #151   +/-   ##
=======================================
  Coverage   70.09%   70.09%           
=======================================
  Files          52       52           
  Lines        4751     4751           
=======================================
  Hits         3330     3330           
  Misses       1421     1421