if (resp.isEmpty()) { throw new RevocationException("Failed to return CRL, revoke response is empty");
if (resp.isEmpty()) { throw new RevocationException("Failed to return CRL, revoke response is empty");
if (resp.isEmpty()) { throw new RevocationException("Failed to return CRL, revoke response is empty");
@Override public boolean isEmpty() { return json.isEmpty(); }
@Override public final boolean isEmpty() { return this.resource.isEmpty(); }
@Override public boolean isEmpty() { return json.isEmpty(); }
/** * Load RESTRules once * @param restClient */ private synchronized void loadRESTRulesIfNotExist(RESTClient restClient) { if (restMetadataJson == null || restMetadataJson.isEmpty()) { restMetadataJson = loadRESTCommandsFromServer(restClient); } }
@Override public Map<String, String> flatten(final JsonObject form) { final Map<String, String> keyValues = new HashMap<>(); if (form == null || form.isEmpty()) { return keyValues; } return form .entrySet() .stream() .filter(v -> v.getValue().getValueType() != JsonValue.ValueType.NULL) .map(this::flattenValue) .flatMap(map -> map.entrySet().stream()) .collect(toMap(Map.Entry::getKey, Map.Entry::getValue)); }
private void onObject(final Collection<ParameterMeta> definitions, final ParameterMeta meta, final Map<String, String> config, final JsonObjectBuilder json, final String name, final String currentPath) { final JsonObject unflatten = unflatten(currentPath, definitions, config); if (!unflatten.isEmpty()) { json.add(name, unflatten); parameterVisitor.onParameter(meta, unflatten); } else { parameterVisitor.onParameter(meta, JsonValue.NULL); } }
private JsonObjectBuilder buildResponses(final ResourceMethod method) { final JsonObjectBuilder responses = Json.createObjectBuilder(); method.getResponses().entrySet().stream().sorted(mapKeyComparator()).forEach(e -> { final JsonObjectBuilder headers = Json.createObjectBuilder(); e.getValue().getHeaders().stream().sorted().forEach(h -> headers.add(h, Json.createObjectBuilder().add("type", "string"))); final JsonObjectBuilder response = Json.createObjectBuilder() .add("description", e.getValue().getDescription() != null ? e.getValue().getDescription() : Optional.ofNullable(Response.Status.fromStatusCode(e.getKey())).map(Response.Status::getReasonPhrase).orElse("")) .add("headers", headers); if (e.getValue().getResponseBody() != null) { final JsonObject schema = schemaBuilder.build(e.getValue().getResponseBody()).build(); if (!schema.isEmpty()) response.add("schema", schema); } responses.add(e.getKey().toString(), response); }); return responses; }
private JsonObjectBuilder buildResponses(final ResourceMethod method) { final JsonObjectBuilder responses = Json.createObjectBuilder(); method.getResponses().entrySet().stream().sorted(mapKeyComparator()).forEach(e -> { final JsonObjectBuilder headers = Json.createObjectBuilder(); e.getValue().getHeaders().stream().sorted().forEach(h -> headers.add(h, Json.createObjectBuilder().add("type", "string"))); final JsonObjectBuilder response = Json.createObjectBuilder() .add("description", e.getValue().getDescription() != null ? e.getValue().getDescription() : Optional.ofNullable(Response.Status.fromStatusCode(e.getKey())).map(Response.Status::getReasonPhrase).orElse("")) .add("headers", headers); if (e.getValue().getResponseBody() != null) { final JsonObject schema = schemaBuilder.build(e.getValue().getResponseBody()).build(); if (!schema.isEmpty()) response.add("schema", schema); } responses.add(e.getKey().toString(), response); }); return responses; }
/** * starts or stops ssh tunnel according to current config * @param config json object with proxy configs * @return completable future of type void */ public CompletableFuture<Unit> update(JsonObject config) { CompletableFuture<Unit> completableFuture = CompletableFuture.completedFuture(UNIT); if (config != null && !config.isEmpty()) { setSshConnection(config); completableFuture = processValidConfig(); } else { handleUnexpectedTunnelState("Received invalid proxy config", FAILED); } return completableFuture; }
JsonObjectBuilder objectBuilder = provider.createObjectBuilder(); if (jsonObject.isEmpty() && isPositionToAdd(currentPath)) { objectBuilder.add(lastReferenceToken, newValue); } else {
if (resp.isEmpty()) { throw new RevocationException("Failed to return CRL, revoke response is empty");
if (resp.isEmpty()) { throw new RevocationException("Failed to return CRL, revoke response is empty");
if (resp.isEmpty()) { throw new RevocationException("Failed to return CRL, revoke response is empty");
final JsonObject enrichment = modelEnricherService.extractEnrichment(config.getConfigurationType(), lang, payload); final JsonObject configuration = enrichment.isEmpty() ? payload : payload .entrySet()
final JsonObject enrichment = modelEnricherService.extractEnrichment(node.getConfigurationType(), lang, payload); final JsonObject configuration = enrichment.isEmpty() ? payload : payload .entrySet()
String result = queueControl.countDeliveringMessages(key + " =" + valueGroup1, key); JsonObject jsonObject = JsonUtil.readJsonObject(result); Assert.assertTrue(jsonObject.isEmpty());
String result = queueControl.countDeliveringMessages(null, key); JsonObject jsonObject = JsonUtil.readJsonObject(result); Assert.assertTrue(jsonObject.isEmpty());