diff options
author | Anton Tananaev <anton@traccar.org> | 2024-07-07 12:48:35 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2024-07-07 12:48:35 -0700 |
commit | cf6aa038b7514201ffb89fa26a4ba7d921b8f16f (patch) | |
tree | 671cf39466dfe8bb7f837c25f4d52d3362b19575 /src/main/java/org/traccar/storage | |
parent | d0536ccbc1b7234784c5e48288bbac00a60ef821 (diff) | |
download | trackermap-server-cf6aa038b7514201ffb89fa26a4ba7d921b8f16f.tar.gz trackermap-server-cf6aa038b7514201ffb89fa26a4ba7d921b8f16f.tar.bz2 trackermap-server-cf6aa038b7514201ffb89fa26a4ba7d921b8f16f.zip |
Migrate to records
Diffstat (limited to 'src/main/java/org/traccar/storage')
-rw-r--r-- | src/main/java/org/traccar/storage/MemoryStorage.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/org/traccar/storage/MemoryStorage.java b/src/main/java/org/traccar/storage/MemoryStorage.java index 18cb6a294..1ec8bfe57 100644 --- a/src/main/java/org/traccar/storage/MemoryStorage.java +++ b/src/main/java/org/traccar/storage/MemoryStorage.java @@ -95,9 +95,9 @@ public class MemoryStorage extends Storage { return getPermissionsSet(condition.getOwnerClass(), condition.getPropertyClass()).stream() .anyMatch(pair -> { if (condition.getOwnerId() > 0) { - return pair.getFirst() == condition.getOwnerId() && pair.getSecond() == id; + return pair.first() == condition.getOwnerId() && pair.second() == id; } else { - return pair.getFirst() == id && pair.getSecond() == condition.getPropertyId(); + return pair.first() == id && pair.second() == condition.getPropertyId(); } }); @@ -168,9 +168,9 @@ public class MemoryStorage extends Storage { Class<? extends BaseModel> ownerClass, long ownerId, Class<? extends BaseModel> propertyClass, long propertyId) { return getPermissionsSet(ownerClass, propertyClass).stream() - .filter(pair -> ownerId == 0 || pair.getFirst().equals(ownerId)) - .filter(pair -> propertyId == 0 || pair.getSecond().equals(propertyId)) - .map(pair -> new Permission(ownerClass, pair.getFirst(), propertyClass, pair.getSecond())) + .filter(pair -> ownerId == 0 || pair.first().equals(ownerId)) + .filter(pair -> propertyId == 0 || pair.second().equals(propertyId)) + .map(pair -> new Permission(ownerClass, pair.first(), propertyClass, pair.second())) .collect(Collectors.toList()); } |