Skip to content

Commit

Permalink
Merge pull request #1165 from eclipse-passage/1146
Browse files Browse the repository at this point in the history
License agreement restrictions must be emitted with restrictive level #1146
  • Loading branch information
ruspl-afed authored Nov 27, 2022
2 parents 8910f54 + 0726634 commit 2d4cc7a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,17 @@ private void appendAgreements(StringBuilder out) {
Collection<AgreementToAccept> agreements = certificate.agreements();
out.append(String.format("Agreements state contains %d entries.\r\n", agreements.size())); //$NON-NLS-1$
agreements.forEach(agreement -> {
boolean accepted = agreement.acceptance().accepted();
out.append("\tagreement [") //$NON-NLS-1$
.append(agreement.definition().path())//
.append("]\r\n\tdeclared by [") //$NON-NLS-1$
.append(agreement.origin())//
.append("]\r\n\thas [") //$NON-NLS-1$
.append(agreement.acceptance().accepted() ? "accepted" : "not accepted") //$NON-NLS-1$//$NON-NLS-2$
.append(accepted ? "accepted" : "not accepted") //$NON-NLS-1$//$NON-NLS-2$
.append("] state.\r\n"); //$NON-NLS-1$
if (!accepted) {
out.append("\tThis is FATAL!11. Product cannot proceed without the agreement been accepted.\r\n"); //$NON-NLS-1$
}
if (agreement.acceptance().error().isPresent()) {
out.append("\terror:\r\n\t") //$NON-NLS-1$
.append(new TroubleExplained(agreement.acceptance().error().get()).get())//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.eclipse.passage.loc.internal.licenses.core.i18n.LicensesCoreMessages;
import org.eclipse.passage.loc.internal.products.core.ProductKeys;

@SuppressWarnings("restriction")
final class PersistedEncoded {

private final LicensedProduct product;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2019, 2020 ArSysOp
* Copyright (c) 2019, 2022 ArSysOp
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
Expand Down Expand Up @@ -32,6 +32,7 @@
import org.eclipse.passage.loc.internal.api.workspace.OperatorWorkspace;
import org.eclipse.passage.loc.workbench.emfforms.renderers.FileContentRenderer;

@SuppressWarnings("restriction")
public abstract class ProductVersionKeyRenderer extends FileContentRenderer<ProductVersion> {

protected final OperatorWorkspace workspace;
Expand Down

0 comments on commit 2d4cc7a

Please sign in to comment.