diff options
author | Sven Gothel <[email protected]> | 2020-05-30 17:27:54 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-05-30 17:27:54 +0200 |
commit | e9e140ba9a41d4f87a82a7649c3cd0ae7a21fdf7 (patch) | |
tree | f084b3c76b849a687d1d880fdfc6a19bb16ae6c5 /java/direct_bt | |
parent | 96375bf9b3d0bf05798c4b3b06137dd85f34b3a4 (diff) |
Aligned Java scanner 10 w/ native example (working error recovery); Tolerant DBTAdapter.removeDevices().
DBTAdapter.removeDevices() must behave tolerant on inconsistent discovered device count in case of an error.
Both scanner examples behave properly on a forced disconnect test during GATT processing
using the thrown C++ exception (fwd to Java) and receiving the DISCONNECT event.
Diffstat (limited to 'java/direct_bt')
-rw-r--r-- | java/direct_bt/tinyb/DBTAdapter.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/java/direct_bt/tinyb/DBTAdapter.java b/java/direct_bt/tinyb/DBTAdapter.java index b9fde052..c667a92a 100644 --- a/java/direct_bt/tinyb/DBTAdapter.java +++ b/java/direct_bt/tinyb/DBTAdapter.java @@ -318,7 +318,7 @@ public class DBTAdapter extends DBTObject implements BluetoothAdapter final int cj = removeDiscoveredDevices(); final int cn = removeDevicesImpl(); if( cj != cn ) { - throw new InternalError("Inconsistent discovered device count: Native "+cn+", callback "+cj); + System.err.println("DBTAdapter::removeDevices: Inconsistent discovered device count: Native "+cn+", callback "+cj); } return cn; } |