List of usage examples for java.util Objects requireNonNull
public static <T> T requireNonNull(T obj)
From source file:io.github.retz.protocol.GetFileRequest.java
@JsonCreator public GetFileRequest(@JsonProperty(value = "id", required = true) int id, @JsonProperty(value = "file", required = true) String file, @JsonProperty(value = "offset") long offset, @JsonProperty(value = "length") long length) { this.id = id; this.file = Objects.requireNonNull(file); this.offset = offset; this.length = length; }
From source file:io.github.retz.db.Jobs.java
public Jobs(Connection c, ObjectMapper m) throws SQLException { this.conn = Objects.requireNonNull(c); this.mapper = Objects.requireNonNull(m); if (conn.getAutoCommit()) { throw new RuntimeException("Connection must have autocommit disabled"); }//w w w . ja v a 2 s .c om }
From source file:org.eclipse.hono.service.auth.device.X509AuthProvider.java
/** * Creates a new provider for a given configuration. * // w w w .j av a 2 s . com * @param credentialsServiceClient The client. * @param config The configuration. * @throws NullPointerException if any of the parameters are {@code null}. */ @Autowired public X509AuthProvider(final HonoClient credentialsServiceClient, final ServiceConfigProperties config) { super(credentialsServiceClient); this.config = Objects.requireNonNull(config); }
From source file:net.maritimecloud.identityregistry.model.database.entities.EntityModel.java
/** Copies this entity into the other */ public EntityModel copyTo(EntityModel entity) { Objects.requireNonNull(entity); entity.setId(id);//from ww w . ja v a 2 s. c o m entity.setIdOrganization(idOrganization); entity.setMrn(mrn); entity.setPermissions(permissions); return entity; }
From source file:org.trustedanalytics.metadata.parser.RuntimeConfigurableDataCatalogFactory.java
@Override public DataCatalog get(RestOperations restOperations) { Objects.requireNonNull(restOperations); return new DataCatalogClient(restOperations, dataCatalogUrl); }
From source file:com.buildria.mocking.builder.action.ActionSpec.java
public ActionSpec(String path) { this.path = Objects.requireNonNull(path); }
From source file:com.hpe.caf.worker.testing.SystemSettingsProvider.java
@Override public String getSetting(String name) { Objects.requireNonNull(name); // return System.getProperty(name, System.getenv(name)); return configuration.getString(name); }
From source file:com.buildria.mocking.builder.rule.MethodRuleSpec.java
public MethodRuleSpec(String path) { super(Mocking.HOLDER.get().getCalls()); this.path = Objects.requireNonNull(path); }
From source file:onl.area51.httpd.action.Action.java
default Action compose(Action before) { Objects.requireNonNull(before); return before.andThen(this); }
From source file:org.eclipse.hono.service.auth.impl.Application.java
/** * Sets the authentication service implementation this server is based on. * /* w ww . j av a 2s. com*/ * @param authService The service implementation. * @throws NullPointerException if service is {@code null}. */ @Autowired public void setAuthenticationService(final FileBasedAuthenticationService authService) { this.authenticationService = Objects.requireNonNull(authService); }