com.swak.license.api.UncheckedLicenseManager Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of swak-license-core Show documentation
Show all versions of swak-license-core Show documentation
swak component of trueLicense core
The newest version!
/*
* Copyright (C) 2005 - 2019 Schlichtherle IT Services.
* All rights reserved. Use is subject to license terms.
*/
package com.swak.license.api;
import java.util.concurrent.Callable;
/**
* Provides utilities for unchecked license managers.
*
* @see UncheckedConsumerLicenseManager
* @see UncheckedVendorLicenseManager
*/
final class UncheckedLicenseManager {
private UncheckedLicenseManager() {
}
static V callUnchecked(Callable task) {
try {
return task.call();
} catch (RuntimeException e) {
throw e;
} catch (Exception e) {
throw new UncheckedLicenseManagementException(e);
}
}
}