From 4565dc297e2fc4adccdc68e3463bda0f1925b940 Mon Sep 17 00:00:00 2001 From: eparovyshnaya Date: Tue, 27 Oct 2020 09:09:07 +0300 Subject: [PATCH] Bug 567032 issue floating license configuration wizard Rework existing LicenseOperatorService to extend it with floating license issuing. Signed-off-by: eparovyshnaya --- .../licenses/core/PersonalLicensePackFromRequest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bundles/org.eclipse.passage.loc.licenses.core/src/org/eclipse/passage/loc/internal/licenses/core/PersonalLicensePackFromRequest.java b/bundles/org.eclipse.passage.loc.licenses.core/src/org/eclipse/passage/loc/internal/licenses/core/PersonalLicensePackFromRequest.java index 165092440..d4e41d9f2 100644 --- a/bundles/org.eclipse.passage.loc.licenses.core/src/org/eclipse/passage/loc/internal/licenses/core/PersonalLicensePackFromRequest.java +++ b/bundles/org.eclipse.passage.loc.licenses.core/src/org/eclipse/passage/loc/internal/licenses/core/PersonalLicensePackFromRequest.java @@ -25,7 +25,7 @@ final class PersonalLicensePackFromRequest implements Supplier { private final PersonalLicenseRequest request; - private LicenseRegistry registry; + private final LicenseRegistry registry; PersonalLicensePackFromRequest(PersonalLicenseRequest request, LicenseRegistry registry) { this.request = request; @@ -43,11 +43,11 @@ public LicensePack get() { pack.setProductVersion(request.productVersion()); String planIdentifier = request.plan(); pack.setPlanIdentifier(planIdentifier); - LicensePlanDescriptor licensePlan = registry.getLicensePlan(planIdentifier); - if (licensePlan == null) { + LicensePlanDescriptor plan = registry.getLicensePlan(planIdentifier); + if (plan == null) { return pack; // FIXME: ServiceInvocationResult should probably be used } - Iterable features = licensePlan.getLicensePlanFeatures(); + Iterable features = plan.getLicensePlanFeatures(); EList grants = pack.getLicenseGrants(); for (LicensePlanFeatureDescriptor planFeature : features) { LicenseGrant grant = new LicenseGrantFromRequest(planFeature, request).get();