aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2021-01-30 01:42:42 +0100
committerSven Gothel <[email protected]>2021-01-30 01:42:42 +0100
commit24e02130f7ec2ddbc37b22a1e05e3a2a5154897e (patch)
treeb141efd07fd9dbcb230fc8b39ec7bea6b6494147
parent20492689931629dd60ad459e72ab2e7e385257d4 (diff)
BTDevice.cpp disconnect() method is noexcept, since all invoked methods are noexcept; Earmark in BTDevice.java for direct_bt.
-rw-r--r--java/jau/direct_bt/DBTDevice.java8
-rw-r--r--java/org/direct_bt/BTDevice.java1
2 files changed, 5 insertions, 4 deletions
diff --git a/java/jau/direct_bt/DBTDevice.java b/java/jau/direct_bt/DBTDevice.java
index d582358e..a1d1d6ee 100644
--- a/java/jau/direct_bt/DBTDevice.java
+++ b/java/jau/direct_bt/DBTDevice.java
@@ -470,22 +470,22 @@ public class DBTDevice extends DBTObject implements BTDevice
public final short getConnectionHandle() { return hciConnHandle; }
@Override
- public final HCIStatusCode disconnect() throws BTException {
+ public final HCIStatusCode disconnect() {
if( isConnected.get() ) {
return HCIStatusCode.get( disconnectImpl() ); // event callbacks will be generated by implementation
}
return HCIStatusCode.CONNECTION_TERMINATED_BY_LOCAL_HOST;
}
- private native byte disconnectImpl() throws BTException;
+ private native byte disconnectImpl();
@Override
- public final HCIStatusCode connect() throws BTException {
+ public final HCIStatusCode connect() {
if( !isConnected.get() ) {
return HCIStatusCode.get( connectDefaultImpl() ); // event callbacks will be generated by implementation
}
return HCIStatusCode.CONNECTION_ALREADY_EXISTS;
}
- private native byte connectDefaultImpl() throws BTException;
+ private native byte connectDefaultImpl();
@Override
public HCIStatusCode connectLE(final short le_scan_interval, final short le_scan_window,
diff --git a/java/org/direct_bt/BTDevice.java b/java/org/direct_bt/BTDevice.java
index db17960d..63d0a08e 100644
--- a/java/org/direct_bt/BTDevice.java
+++ b/java/org/direct_bt/BTDevice.java
@@ -94,6 +94,7 @@ public interface BTDevice extends BTObject
* </p>
* @return {@link HCIStatusCode#SUCCESS} if the command has been accepted, otherwise {@link HCIStatusCode} may disclose reason for rejection.
* @since 2.1.0 change API, i.e. return value from boolean to HCIStatusCode in favor of <i>direct_bt</i>
+ * @implNote {@code jau.direct_bt} does not throw a BTException on error, only a 'general' exception in case of fatality like NPE etc (FIXME: Remove throws)
*/
HCIStatusCode disconnect() throws BTException;