Example usage for java.util Objects requireNonNullElse

List of usage examples for java.util Objects requireNonNullElse

Introduction

In this page you can find the example usage for java.util Objects requireNonNullElse.

Prototype

public static <T> T requireNonNullElse(T obj, T defaultObj) 

Source Link

Document

Returns the first argument if it is non- null and otherwise returns the non- null second argument.

Usage

From source file:org.ligoj.app.plugin.prov.aws.ProvAwsTerraformService.java

private ProvLocation getLocation(final AbstractQuoteResource resource) {
    return Objects.requireNonNullElse(resource.getLocation(), resource.getConfiguration().getLocation());
}