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

org.apache.rocketmq.shaded.io.opentelemetry.api.internal.Utils Maven / Gradle / Ivy

There is a newer version: 5.0.7
Show newest version
/*
 * Copyright The OpenTelemetry Authors
 * SPDX-License-Identifier: Apache-2.0
 */

package org.apache.rocketmq.shaded.io.opentelemetry.api.internal;

import javax.annotation.concurrent.Immutable;

/**
 * General internal utility methods.
 *
 * 

This class is internal and is hence not for public use. Its APIs are unstable and can change * at any time. */ @Immutable public final class Utils { private Utils() {} /** * Throws an {@link IllegalArgumentException} if the argument is false. This method is similar to * {@code Preconditions.checkArgument(boolean, Object)} from Guava. * * @param isValid whether the argument check passed. * @param errorMessage the message to use for the exception. */ public static void checkArgument(boolean isValid, String errorMessage) { if (!isValid) { throw new IllegalArgumentException(errorMessage); } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy