JsonFieldSelectorInvalidException.newBuilder().message(getMessage(jsonObject)).build(), dittoHeaders));
private void validateJsonFieldSelectorString() { if (jsonFieldSelectorString.isEmpty()) { throw JsonFieldSelectorInvalidException.newBuilder() // .fieldSelector(jsonFieldSelectorString) // .build(); } if (jsonFieldSelectorString.contains(OPENING_PARENTHESIS)) { final int openedParenthesesCnt = getCountOf(OPENING_PARENTHESIS); final int closedParenthesesCnt = getCountOf(CLOSING_PARENTHESIS); if (openedParenthesesCnt != closedParenthesesCnt) { throw JsonFieldSelectorInvalidException.newBuilder() // .fieldSelector(jsonFieldSelectorString) // .build(); } } }
JsonFieldSelectorInvalidException.newBuilder().message(getMessage(jsonObject)).build(), dittoHeaders));
private void validateJsonFieldSelectorString() { if (jsonFieldSelectorString.isEmpty()) { throw JsonFieldSelectorInvalidException.newBuilder() // .fieldSelector(jsonFieldSelectorString) // .build(); } if (jsonFieldSelectorString.contains(OPENING_PARENTHESIS)) { final int openedParenthesesCnt = getCountOf(OPENING_PARENTHESIS); final int closedParenthesesCnt = getCountOf(CLOSING_PARENTHESIS); if (openedParenthesesCnt != closedParenthesesCnt) { throw JsonFieldSelectorInvalidException.newBuilder() // .fieldSelector(jsonFieldSelectorString) // .build(); } } }
private Builder() { super(ERROR_CODE); description(DEFAULT_DESCRIPTION); }
/** * Sets a message which points to the invalid field selector. Thus if this method is called, {@link #message} * should not be called. * * @param fieldSelector the invalid field selector string. * @return this builder to allow method chaining. */ public Builder fieldSelector(final String fieldSelector) { message(MessageFormat.format("The field selector <{0}> is invalid!", fieldSelector)); return this; }
/** * Returns a builder for fluently creating instances of {@code JsonParseException}s.. * * @return a new builder for JsonParseException objects. */ public static Builder newBuilder() { return new Builder(); }
@SuppressWarnings("squid:S1166") private static String tryToDecodeString(final String s, final JsonParseOptions jsonParseOptions) { try { return decode(s, jsonParseOptions); } catch (final Exception e) { throw JsonFieldSelectorInvalidException.newBuilder() // .fieldSelector(s) // .description("Check if the field selector is correctly URL encoded.") // .cause(e) // .build(); } }
private Builder() { super(ERROR_CODE); description(DEFAULT_DESCRIPTION); }
/** * Returns a builder for fluently creating instances of {@code JsonParseException}s.. * * @return a new builder for JsonParseException objects. */ public static Builder newBuilder() { return new Builder(); }
/** * Sets a message which points to the invalid field selector. Thus if this method is called, {@link #message} * should not be called. * * @param fieldSelector the invalid field selector string. * @return this builder to allow method chaining. */ public Builder fieldSelector(final String fieldSelector) { message(MessageFormat.format("The field selector <{0}> is invalid!", fieldSelector)); return this; }
@SuppressWarnings("squid:S1166") private static String tryToDecodeString(final String s, final JsonParseOptions jsonParseOptions) { try { return decode(s, jsonParseOptions); } catch (final Exception e) { throw JsonFieldSelectorInvalidException.newBuilder() // .fieldSelector(s) // .description("Check if the field selector is correctly URL encoded.") // .cause(e) // .build(); } }