aboutsummaryrefslogtreecommitdiffstats
path: root/java/direct_bt
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2020-05-30 17:27:54 +0200
committerSven Gothel <[email protected]>2020-05-30 17:27:54 +0200
commite9e140ba9a41d4f87a82a7649c3cd0ae7a21fdf7 (patch)
treef084b3c76b849a687d1d880fdfc6a19bb16ae6c5 /java/direct_bt
parent96375bf9b3d0bf05798c4b3b06137dd85f34b3a4 (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.java2
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;
}