Skip to content

Commit

Permalink
Bug 567032 issue floating license configuration wizard
Browse files Browse the repository at this point in the history
 Rework existing LicenseOperatorService to extend it with floating
license issuing.

Signed-off-by: eparovyshnaya <[email protected]>
  • Loading branch information
eparovyshnaya committed Oct 27, 2020
1 parent ef49998 commit 4565dc2
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

final class PersonalLicensePackFromRequest implements Supplier<LicensePack> {
private final PersonalLicenseRequest request;
private LicenseRegistry registry;
private final LicenseRegistry registry;

PersonalLicensePackFromRequest(PersonalLicenseRequest request, LicenseRegistry registry) {
this.request = request;
Expand All @@ -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<LicensePack> should probably be used
}
Iterable<? extends LicensePlanFeatureDescriptor> features = licensePlan.getLicensePlanFeatures();
Iterable<? extends LicensePlanFeatureDescriptor> features = plan.getLicensePlanFeatures();
EList<LicenseGrant> grants = pack.getLicenseGrants();
for (LicensePlanFeatureDescriptor planFeature : features) {
LicenseGrant grant = new LicenseGrantFromRequest(planFeature, request).get();
Expand Down

0 comments on commit 4565dc2

Please sign in to comment.