From: Damyan Ivanov Date: Fri, 19 Apr 2019 17:24:39 +0000 (+0300) Subject: name variable keeping auto-closed resource 'ignored' X-Git-Tag: v0.10.0~80 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=e9f0dc7fe24c6e58615a9913a6450897d0a3b7b9;p=mobile-ledger.git name variable keeping auto-closed resource 'ignored' --- diff --git a/app/src/main/java/net/ktnx/mobileledger/model/Data.java b/app/src/main/java/net/ktnx/mobileledger/model/Data.java index 010756f9..d183c4c8 100644 --- a/app/src/main/java/net/ktnx/mobileledger/model/Data.java +++ b/app/src/main/java/net/ktnx/mobileledger/model/Data.java @@ -60,7 +60,7 @@ public final class Data { profile.set(newProfile); } public static int getProfileIndex(MobileLedgerProfile profile) { - try (LockHolder lh = profiles.lockForReading()) { + try (LockHolder ignored = profiles.lockForReading()) { for (int i = 0; i < profiles.size(); i++) { MobileLedgerProfile p = profiles.get(i); if (p.equals(profile)) return i; @@ -70,7 +70,7 @@ public final class Data { } } public static int getProfileIndex(String profileUUID) { - try (LockHolder lh = profiles.lockForReading()) { + try (LockHolder ignored = profiles.lockForReading()) { for (int i = 0; i < profiles.size(); i++) { MobileLedgerProfile p = profiles.get(i); if (p.getUuid().equals(profileUUID)) return i; @@ -98,7 +98,7 @@ public final class Data { profile = MobileLedgerProfile.loadAllFromDB(profileUUID); } else { - try (LockHolder lh = profiles.lockForReading()) { + try (LockHolder ignored = profiles.lockForReading()) { int i = getProfileIndex(profileUUID); if (i == -1) i = 0; profile = profiles.get(i);