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 = fun interfaceIdsEqualsTo(other: TraceableDBEntry): Boolean =
interfaceIDs.nightscoutId == interfaceIDs.nightscoutId && interfaceIDs.nightscoutId == other.interfaceIDs.nightscoutId &&
interfaceIDs.nightscoutSystemId == interfaceIDs.nightscoutSystemId && interfaceIDs.nightscoutSystemId == other.interfaceIDs.nightscoutSystemId &&
interfaceIDs.pumpType == interfaceIDs.pumpType && interfaceIDs.pumpType == other.interfaceIDs.pumpType &&
interfaceIDs.pumpSerial == interfaceIDs.pumpSerial && interfaceIDs.pumpSerial == other.interfaceIDs.pumpSerial &&
interfaceIDs.temporaryId == interfaceIDs.temporaryId && interfaceIDs.temporaryId == other.interfaceIDs.temporaryId &&
interfaceIDs.pumpId == interfaceIDs.pumpId && interfaceIDs.pumpId == other.interfaceIDs.pumpId &&
interfaceIDs.startId == interfaceIDs.startId && interfaceIDs.startId == other.interfaceIDs.startId &&
interfaceIDs.endId == interfaceIDs.endId 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()) TriggerConnector::class.java.simpleName -> TriggerConnector(injector).fromJSON(data.toString())
TriggerDelta::class.java.simpleName -> TriggerDelta(injector).fromJSON(data.toString()) TriggerDelta::class.java.simpleName -> TriggerDelta(injector).fromJSON(data.toString())
TriggerDummy::class.java.simpleName -> TriggerDummy(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()) TriggerLocation::class.java.simpleName -> TriggerLocation(injector).fromJSON(data.toString())
TriggerProfilePercent::class.java.simpleName -> TriggerProfilePercent(injector).fromJSON(data.toString()) TriggerProfilePercent::class.java.simpleName -> TriggerProfilePercent(injector).fromJSON(data.toString())
TriggerPumpLastConnection::class.java.simpleName -> TriggerPumpLastConnection(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 { try {
// let command thread finish updating activeCmd var // let command thread finish updating activeCmd var
cmdThread.join(1000); cmdThread.join(1000);
} catch (InterruptedException e) { } catch (InterruptedException ignored) {
// ignore // ignore
} }
} }
@ -855,7 +855,7 @@ public class RuffyScripter implements RuffyCommands {
public String getMacAddress() { public String getMacAddress() {
try { try {
return ruffyService.getMacAddress(); return ruffyService.getMacAddress();
} catch (RemoteException e) { } catch (RemoteException ignored) {
// ignore; ruffy version is probably old and doesn't support reading MAC address yet // ignore; ruffy version is probably old and doesn't support reading MAC address yet
return null; return null;
} }

View file

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