- if (Data.profiles.isEmpty()) {
- profile = MobileLedgerProfile.loadAllFromDB(profileUUID);
- }
- else {
- try (LockHolder lh = Data.profiles.lockForReading()) {
- int i = Data.getProfileIndex(profileUUID);
- if (i == -1) i = 0;
- profile = Data.profiles.get(i);
- }
- }