lints & small fixes

This commit is contained in:
Milos Kozak 2023-02-14 11:37:31 +01:00
parent 91590f04ce
commit 388ee3d56c
4 changed files with 12 additions and 13 deletions

View file

@ -27,13 +27,13 @@ interface TraceableDBEntry: DBEntry {
}
fun interfaceIdsEqualsTo(other: TraceableDBEntry): Boolean =
interfaceIDs.nightscoutId == interfaceIDs.nightscoutId &&
interfaceIDs.nightscoutSystemId == interfaceIDs.nightscoutSystemId &&
interfaceIDs.pumpType == interfaceIDs.pumpType &&
interfaceIDs.pumpSerial == interfaceIDs.pumpSerial &&
interfaceIDs.temporaryId == interfaceIDs.temporaryId &&
interfaceIDs.pumpId == interfaceIDs.pumpId &&
interfaceIDs.startId == interfaceIDs.startId &&
interfaceIDs.endId == interfaceIDs.endId
interfaceIDs.nightscoutId == other.interfaceIDs.nightscoutId &&
interfaceIDs.nightscoutSystemId == other.interfaceIDs.nightscoutSystemId &&
interfaceIDs.pumpType == other.interfaceIDs.pumpType &&
interfaceIDs.pumpSerial == other.interfaceIDs.pumpSerial &&
interfaceIDs.temporaryId == other.interfaceIDs.temporaryId &&
interfaceIDs.pumpId == other.interfaceIDs.pumpId &&
interfaceIDs.startId == other.interfaceIDs.startId &&
interfaceIDs.endId == other.interfaceIDs.endId
}

View file

@ -95,7 +95,6 @@ abstract class Trigger(val injector: HasAndroidInjector) {
TriggerConnector::class.java.simpleName -> TriggerConnector(injector).fromJSON(data.toString())
TriggerDelta::class.java.simpleName -> TriggerDelta(injector).fromJSON(data.toString())
TriggerDummy::class.java.simpleName -> TriggerDummy(injector).fromJSON(data.toString())
TriggerIob::class.java.simpleName -> TriggerIob(injector).fromJSON(data.toString())
TriggerLocation::class.java.simpleName -> TriggerLocation(injector).fromJSON(data.toString())
TriggerProfilePercent::class.java.simpleName -> TriggerProfilePercent(injector).fromJSON(data.toString())
TriggerPumpLastConnection::class.java.simpleName -> TriggerPumpLastConnection(injector).fromJSON(data.toString())

View file

@ -375,7 +375,7 @@ public class RuffyScripter implements RuffyCommands {
try {
// let command thread finish updating activeCmd var
cmdThread.join(1000);
} catch (InterruptedException e) {
} catch (InterruptedException ignored) {
// ignore
}
}
@ -855,7 +855,7 @@ public class RuffyScripter implements RuffyCommands {
public String getMacAddress() {
try {
return ruffyService.getMacAddress();
} catch (RemoteException e) {
} catch (RemoteException ignored) {
// ignore; ruffy version is probably old and doesn't support reading MAC address yet
return null;
}

View file

@ -129,7 +129,7 @@ public class BolusCommand extends BaseCommand {
if (cancellationThread != null) {
try {
cancellationThread.join(3500);
} catch (InterruptedException e) {
} catch (InterruptedException ignored) {
// ignore
}
}
@ -175,7 +175,7 @@ public class BolusCommand extends BaseCommand {
if (cancellationThread != null) {
try {
cancellationThread.join();
} catch (InterruptedException e) {
} catch (InterruptedException ignored) {
// ignore
}
}