From a235cac7efac249fd3b61bf8dd3afab82753c990 Mon Sep 17 00:00:00 2001 From: "elena.parovyshnaya" Date: Fri, 6 Dec 2019 18:38:54 +0300 Subject: [PATCH] 553807 - revise permission observatory API - better syntax for lambda usage Signed-off-by: elena.parovyshnaya --- .../internal/base/permission/BasePermissionObservatory.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bundles/org.eclipse.passage.lic.base/src/org/eclipse/passage/lic/internal/base/permission/BasePermissionObservatory.java b/bundles/org.eclipse.passage.lic.base/src/org/eclipse/passage/lic/internal/base/permission/BasePermissionObservatory.java index 8f6aa21f7..a05f50549 100644 --- a/bundles/org.eclipse.passage.lic.base/src/org/eclipse/passage/lic/internal/base/permission/BasePermissionObservatory.java +++ b/bundles/org.eclipse.passage.lic.base/src/org/eclipse/passage/lic/internal/base/permission/BasePermissionObservatory.java @@ -39,11 +39,11 @@ public BasePermissionObservatory(CheckSchedule schedule, Consumer permissions) { - onEachPermission(permissions, limited -> observatory.watch(limited)); + onEachPermission(permissions, observatory::watch); } public void forget(Iterable permissions) { - onEachPermission(permissions, limited -> observatory.forget(limited)); + onEachPermission(permissions, observatory::forget); } public void open() { @@ -53,7 +53,7 @@ public void open() { private void onEachPermission(Iterable permissions, Consumer action) { StreamSupport.stream(permissions.spliterator(), false)// .map(LimitedPermission::new) // - .forEach(limited -> action.accept(limited)); + .forEach(action::accept); } }