List of usage examples for java.util Objects requireNonNull
public static <T> T requireNonNull(T obj)
From source file:io.github.moosbusch.permagon.application.spi.AbstractPermagonApplicationContext.java
public AbstractPermagonApplicationContext( PermagonApplication<? extends PermagonApplicationContext> application) { this.fxmlFieldInjector = new FxmlFieldInjector(this); init(Objects.requireNonNull(application)); }
From source file:com.mcleodmoores.mvn.natives.PackageMojo.java
void setOutputStreams(final OutputStreamOpener outputStreams) { _outputStreams = Objects.requireNonNull(outputStreams); }
From source file:org.eclipse.hono.service.auth.impl.AuthenticationServerConfigProperties.java
/** * Set the resource that the authorization rules should be loaded from. * <p>/*from www . ja v a 2 s .c om*/ * If not set the default permissions will be loaded from <em>classpath:permissions.json</em>. * * @param permissionsResource The resource. * @throws NullPointerException if the resource is {@code null}. */ public final void setPermissionsPath(final Resource permissionsResource) { this.permissionsResource = Objects.requireNonNull(permissionsResource); }
From source file:com.smoketurner.notification.application.config.SnowizardConfiguration.java
@JsonIgnore public IdWorker build(@Nonnull final Environment environment) { Objects.requireNonNull(environment); final MetricRegistry registry = environment.metrics(); registry.register(MetricRegistry.name(NotificationApplication.class, "worker_id"), new Gauge<Integer>() { @Override// w w w .j ava 2 s . c om public Integer getValue() { return workerId; } }); registry.register(MetricRegistry.name(NotificationApplication.class, "datacenter_id"), new Gauge<Integer>() { @Override public Integer getValue() { return datacenterId; } }); LOGGER.info("Worker ID: {}, Datacenter ID: {}", workerId, datacenterId); return new IdWorker(workerId, datacenterId, 0, false, registry); }
From source file:com.github.horrorho.inflatabledonkey.cache.FileCache.java
FileCache(StreamCryptor fileCryptor) {
this.fileCryptor = Objects.requireNonNull(fileCryptor);
}
From source file:org.trustedanalytics.platformoperations.service.PlatformOperationsScheduler.java
@Autowired public PlatformOperationsScheduler(PlatformSummaryMongoRepository repository, ScheduledThreadPoolExecutor executor, CcOperations client, Nats nats) { this.repository = Objects.requireNonNull(repository); this.client = Objects.requireNonNull(client); this.executor = Objects.requireNonNull(executor); this.nats = Objects.requireNonNull(nats); }
From source file:com.github.horrorho.liquiddonkey.cloud.client.AuthClient.java
AuthClient(ResponseHandler<byte[]> byteArrayResponseHandler, Headers headers) { this.byteArrayResponseHandler = Objects.requireNonNull(byteArrayResponseHandler); this.headers = Objects.requireNonNull(headers); }
From source file:io.lavagna.web.helper.UserSession.java
public static int getUserId(HttpServletRequest req) { Object o = req.getSession().getAttribute(AUTH_USER_ID); Objects.requireNonNull(o); return (int) o; }
From source file:com.spotify.styx.api.deprecated.CliResource.java
public CliResource(StatusResource statusResource, String schedulerServiceBaseUrl) { this.statusResource = Objects.requireNonNull(statusResource); this.schedulerServiceBaseUrl = Objects.requireNonNull(schedulerServiceBaseUrl); }
From source file:com.github.horrorho.liquiddonkey.cloud.client.ChunksClient.java
ChunksClient(ResponseHandler<byte[]> byteArrayResponseHandler, Headers headers) { this.byteArrayResponseHandler = Objects.requireNonNull(byteArrayResponseHandler); this.headers = Objects.requireNonNull(headers); }