if (!timeslotObject.isNull("talk")) { scheduleTalk(timeslotObject, room, timeslot);
} else { final JsonObject lo = array.getJsonObject(x); if (lo.containsKey("type") && !lo.isNull("type") && lo.containsKey("url") && !lo.isNull("url")) { final String license = String.format("%s (%s)", lo.getString("type"), lo.getString("url")); sb.append(license); } else if (lo.containsKey("type") && !lo.isNull("type")) { sb.append(lo.getString("type")); } else if (lo.containsKey("url") && !lo.isNull("url")) { sb.append(lo.getString("url"));
throw new RevocationException("Failed to return CRL, revoke response is empty"); if (resp.isNull("CRL")) { throw new RevocationException("Failed to return CRL");
throw new RevocationException("Failed to return CRL, revoke response is empty"); if (resp.isNull("CRL")) { throw new RevocationException("Failed to return CRL");
throw new RevocationException("Failed to return CRL, revoke response is empty"); if (resp.isNull("CRL")) { throw new RevocationException("Failed to return CRL");
@Override public boolean isNull(String string) { return json.isNull(string); }
@Override public boolean isNull(String string) { return json.isNull(string); }
@Override public final boolean isNull(final String name) { return this.resource.isNull(name); }
/** * Does it have an author? * @return TRUE if the author exists * @throws IOException If there is any I/O problem */ public boolean hasAuthor() throws IOException { return !this.event.json().isNull("actor"); } /**
/** * Validate the request * MessageWebsocketHandler * @param jsonObject * @return String */ private void validateRequest(JsonObject jsonObject) throws Exception { if (!jsonObject.containsKey("id") || jsonObject.isNull("id") || jsonObject.getString("id").trim().equals("")) throw new Exception(" Id value not found "); }
/** * Validate the request * * @param jsonObject * @return String */ private void validateRequest(JsonObject jsonObject) throws Exception { if (!jsonObject.containsKey("id") || jsonObject.isNull("id") || jsonObject.getString("id").trim().equals("")) throw new Exception(" Id value not found "); }
/** * ping IOFog controller * * @return ping result * @throws Exception */ public boolean ping() throws Exception { try { JsonObject result = getJSON(controllerUrl + "status"); return !result.isNull("status"); } catch (Exception exp) { logWarning(MODULE_NAME, exp.getMessage()); throw exp; } }
/** * Is it a pull request? * @return TRUE if it is a pull request * @throws IOException If there is any I/O problem */ public boolean isPull() throws IOException { return this.json().containsKey("pull_request") && !this.jsn.value("pull_request", JsonObject.class) .isNull("html_url"); }
public List<Repository> getPublicRepos(Integer userId, boolean isOrganization) throws IOException { List<Repository> repos = new ArrayList<>(); for (JsonObject node : getPublicRepoNodes(userId, isOrganization)) { try { Long id = decodeRepositoryId(node.getString("id")); String encodedOwnerId = node.getJsonObject("owner").getString("id"); Integer ownerId = isOrganization ? decodeOrganizationId(encodedOwnerId) : decodeUserId(encodedOwnerId); String name = node.getString("name"); String fullName = node.getString("nameWithOwner"); String description = node.isNull("description") ? null : node.getString("description"); Boolean fork = node.getBoolean("isFork"); String homepage = node.isNull("homepageUrl") ? null : node.getString("homepageUrl"); int stargazersCount = node.getJsonObject("stargazers").getInt("totalCount"); String language = node.isNull("primaryLanguage") ? null : node.getJsonObject("primaryLanguage").getString("name"); repos.add(new Repository(id, ownerId, name, fullName, description, fork, homepage, stargazersCount, language)); } catch (ClassCastException e) { Sentry.capture(e); LOG.debug("node: " + node.toString()); throw e; } } return repos; }
throw new RevocationException("Failed to return CRL, revoke response is empty"); if (resp.isNull("CRL")) { throw new RevocationException("Failed to return CRL");
throw new RevocationException("Failed to return CRL, revoke response is empty"); if (resp.isNull("CRL")) { throw new RevocationException("Failed to return CRL");
throw new RevocationException("Failed to return CRL, revoke response is empty"); if (resp.isNull("CRL")) { throw new RevocationException("Failed to return CRL");
throw new RevocationException("Failed to return CRL, revoke response is empty"); if (resp.isNull("CRL")) { throw new RevocationException("Failed to return CRL");
throw new RevocationException("Failed to return CRL, revoke response is empty"); if (resp.isNull("CRL")) { throw new RevocationException("Failed to return CRL");
throw new RevocationException("Failed to return CRL, revoke response is empty"); if (resp.isNull("CRL")) { throw new RevocationException("Failed to return CRL");