MCPcopy Index your code
hub / github.com/OpenFeign/feign / isEncoded

Method isEncoded

core/src/main/java/feign/template/UriUtils.java:37–45  ·  view source on GitHub ↗

Determines if the value is already pct-encoded. @param value to check. @return {@literal true} if the value is already pct-encoded

(String value, Charset charset)

Source from the content-addressed store, hash-verified

35 * @return {@literal true} if the value is already pct-encoded
36 */
37 public static boolean isEncoded(String value, Charset charset) {
38 for (byte b : value.getBytes(charset)) {
39 if (!isUnreserved((char) b) && b != '%') {
40 /* break if there are any unreserved character */
41 return false;
42 }
43 }
44 return PCT_ENCODED_PATTERN.matcher(value).find();
45 }
46
47 /**
48 * Uri Encode the value, using the default Charset. Already encoded values are skipped.

Callers 1

encodeChunkMethod · 0.95

Calls 1

isUnreservedMethod · 0.95

Tested by

no test coverage detected