All Downloads are FREE. Search and download functionalities are using the official Maven repository.

global.namespace.truelicense.api.UncheckedLicenseManager Maven / Gradle / Ivy

/*
 * Copyright (C) 2005 - 2019 Schlichtherle IT Services.
 * All rights reserved. Use is subject to license terms.
 */
package global.namespace.truelicense.api;

import java.util.concurrent.Callable;

/**
 * Provides utilities for unchecked license managers.
 *
 * @author Christian Schlichtherle
 * @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);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy