MCPcopy Index your code
hub / github.com/OpenTSDB/opentsdb / parseTreeRulesV1

Method parseTreeRulesV1

src/tsd/HttpJsonSerializer.java:427–436  ·  view source on GitHub ↗

Parses one or more tree rules @return A list of one or more rules @throws JSONException if parsing failed @throws BadRequestException if the content was missing or parsing failed

()

Source from the content-addressed store, hash-verified

425 * @throws BadRequestException if the content was missing or parsing failed
426 */
427 public List<TreeRule> parseTreeRulesV1() {
428 final String json = query.getContent();
429 if (json == null || json.isEmpty()) {
430 throw new BadRequestException(HttpResponseStatus.BAD_REQUEST,
431 "Missing message content",
432 "Supply valid JSON formatted data in the body of your request");
433 }
434
435 return JSON.parseToObject(json, TR_TREE_RULES);
436 }
437
438 /**
439 * Parses a tree ID and optional list of TSUIDs to search for collisions or

Callers

nothing calls this directly

Calls 3

parseToObjectMethod · 0.95
isEmptyMethod · 0.80
getContentMethod · 0.45

Tested by

no test coverage detected