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

io.opentelemetry.sdk.autoconfigure.spi.ConfigUtil Maven / Gradle / Ivy

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

package io.opentelemetry.sdk.autoconfigure.spi;

import javax.annotation.Nullable;

/**
 * Holder for the non-public defaultIfNull method. This serves only to mitigate the method being on
 * a public interface.
 */
final class ConfigUtil {

  /** Returns defaultValue if value is null, otherwise value. This is an internal method. */
  static  T defaultIfNull(@Nullable T value, T defaultValue) {
    return value == null ? defaultValue : value;
  }

  private ConfigUtil() {}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy