Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

non-null license keys #318

Draft
wants to merge 4 commits into
base: develop
Choose a base branch
from
Draft

Conversation

overheadhunter
Copy link
Member

@PostConstruct LicenseHolder.init() is changed to a normal method LicenseHolder. ensureLicenseExists(), which is called during application start in the newly added Quarkus Main class:

@Override
public int run(String... args) throws Exception {
try {
license.ensureLicenseExists();
} catch (RuntimeException e) {
LOG.error("Failed to validate license, shutting down...", e);
return 1;
}
Quarkus.waitForExit();
return 0;
}

In other words: The application won't start without a license. But fear not, it is able to request a free license autonomously. In other words, if it is running, a license does exist, which reduces a lot of branching.

and remove conditional code
# Conflicts:
#	backend/src/main/java/org/cryptomator/hub/api/AuditLogResource.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant