private ResContainer(String name, List<ResContainer> subFiles, Object data, DataType dataType) { this.name = Objects.requireNonNull(name); this.subFiles = Objects.requireNonNull(subFiles); this.data = Objects.requireNonNull(data); this.dataType = Objects.requireNonNull(dataType); }
public JadxWarn(String warn) { this.warn = Objects.requireNonNull(warn); }
public ImmutableList(E[] arr) { this.arr = Objects.requireNonNull(arr); }
public Builder(Map<ConfigResource, Config> configs, boolean validateOnly) { super(ApiKeys.ALTER_CONFIGS); this.configs = Objects.requireNonNull(configs, "configs"); this.validateOnly = validateOnly; }
public AlterConfigsRequest(short version, Map<ConfigResource, Config> configs, boolean validateOnly) { super(ApiKeys.ALTER_CONFIGS, version); this.configs = Objects.requireNonNull(configs, "configs"); this.validateOnly = validateOnly; }
public RequestHeader(ApiKeys apiKey, short version, String clientId, int correlation) { this.apiKey = requireNonNull(apiKey); this.apiVersion = version; this.clientId = clientId; this.correlationId = correlation; }
public void reauthenticating(String previousSaslMechanism, KafkaPrincipal previousKafkaPrincipal, long reauthenticationBeginNanos) { this.previousSaslMechanism = Objects.requireNonNull(previousSaslMechanism); this.previousKafkaPrincipal = Objects.requireNonNull(previousKafkaPrincipal); this.reauthenticationBeginNanos = reauthenticationBeginNanos; }
/** * Create an instance of this class with the provided parameters. * * @param resourceType non-null resource type * @param name resource name or null */ public ResourceFilter(ResourceType resourceType, String name) { Objects.requireNonNull(resourceType); this.resourceType = resourceType; this.name = name; }
private PendingCommittedOffsetRequest(final Set<TopicPartition> requestedPartitions, final Generation generationAtRequestTime, final RequestFuture<Map<TopicPartition, OffsetAndMetadata>> response) { this.requestedPartitions = Objects.requireNonNull(requestedPartitions); this.response = Objects.requireNonNull(response); this.requestedGeneration = generationAtRequestTime; }
/** * For testing * * @param time * the mandatory time to set */ void time(Time time) { this.time = Objects.requireNonNull(time); }
@SuppressWarnings({"unchecked", "SuspiciousArrayCast"}) public ImmutableList(Collection<E> col) { this((E[]) Objects.requireNonNull(col).toArray()); }
private String option(String key) { if (!configured) throw new IllegalStateException("Callback handler not configured"); return moduleOptions.get(Objects.requireNonNull(key)); }
@Override public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) { this.subject = Objects.requireNonNull(subject); if (!(Objects.requireNonNull(callbackHandler) instanceof AuthenticateCallbackHandler)) throw new IllegalArgumentException(String.format("Callback handler must be castable to %s: %s", AuthenticateCallbackHandler.class.getName(), callbackHandler.getClass().getName())); this.callbackHandler = (AuthenticateCallbackHandler) callbackHandler; }
public boolean isAppNamespaceNameUnique(String appId, String namespaceName) { Objects.requireNonNull(appId, "AppId must not be null"); Objects.requireNonNull(namespaceName, "Namespace must not be null"); return Objects.isNull(appNamespaceRepository.findByAppIdAndName(appId, namespaceName)); }
public boolean isAppNamespaceNameUnique(String appId, String namespaceName) { Objects.requireNonNull(appId, "AppId must not be null"); Objects.requireNonNull(namespaceName, "Namespace must not be null"); return Objects.isNull(appNamespaceRepository.findByAppIdAndName(appId, namespaceName)); }
public OAuthBearerSaslServer(CallbackHandler callbackHandler) { if (!(Objects.requireNonNull(callbackHandler) instanceof AuthenticateCallbackHandler)) throw new IllegalArgumentException(String.format("Callback handler must be castable to %s: %s", AuthenticateCallbackHandler.class.getName(), callbackHandler.getClass().getName())); this.callbackHandler = (AuthenticateCallbackHandler) callbackHandler; }
/** * Extract a claim in its raw form * * @param claimName * the mandatory JWT claim name * @return the raw claim value, if it exists, otherwise null */ public Object rawClaim(String claimName) { return claims().get(Objects.requireNonNull(claimName)); }
/** * Request an update for the partition metadata iff the given leader epoch is at newer than the last seen leader epoch */ public synchronized boolean updateLastSeenEpochIfNewer(TopicPartition topicPartition, int leaderEpoch) { Objects.requireNonNull(topicPartition, "TopicPartition cannot be null"); return updateLastSeenEpoch(topicPartition, leaderEpoch, oldEpoch -> leaderEpoch > oldEpoch, true); }
@SuppressWarnings("unchecked") @Override public void configure(Map<String, ?> configs, String saslMechanism, List<AppConfigurationEntry> jaasConfigEntries) { if (!OAuthBearerLoginModule.OAUTHBEARER_MECHANISM.equals(saslMechanism)) throw new IllegalArgumentException(String.format("Unexpected SASL mechanism: %s", saslMechanism)); if (Objects.requireNonNull(jaasConfigEntries).size() != 1 || jaasConfigEntries.get(0) == null) throw new IllegalArgumentException( String.format("Must supply exactly 1 non-null JAAS mechanism configuration (size was %d)", jaasConfigEntries.size())); this.moduleOptions = Collections.unmodifiableMap((Map<String, String>) jaasConfigEntries.get(0).getOptions()); configured = true; }
@Override public void visitSelect(JCTree.JCFieldAccess jcFieldAccess) { Symbol symbol = jcFieldAccess.sym; if (symbol.getEnclosingElement() != null && symbol.getEnclosingElement().getEnclosingElement() != null && symbol.getEnclosingElement().getEnclosingElement().enclClass() != null) { try { int value = (Integer) requireNonNull(((Symbol.VarSymbol) symbol).getConstantValue()); resourceIds.put(value, new Id(value, symbol)); } catch (Exception ignored) { } } }