MCPcopy Create free account
hub / github.com/BaseXdb/basex / parse

Method parse

basex-core/src/main/java/org/basex/query/util/UriParser.java:182–195  ·  view source on GitHub ↗

Parses an RFC 3986 URI. @param uri the URI to parse @return parsed URI

(final String uri)

Source from the content-addressed store, hash-verified

180 * @return parsed URI
181 */
182 public static ParsedUri parse(final String uri) {
183 final Matcher matcher = URI_REF.matcher(uri);
184 try {
185 if(uri.length() <= 2048 && matcher.matches()) {
186 final ParsedUri pu = new ParsedUri();
187 pu.absolute = matcher.group("scheme") != null;
188 pu.valid = true;
189 return pu;
190 }
191 } catch(final StackOverflowError er) {
192 Util.debug(er);
193 }
194 return ParsedUri.INVALID;
195 }
196
197 /**
198 * URI data.

Callers 1

parsedMethod · 0.95

Calls 5

debugMethod · 0.95
matcherMethod · 0.45
lengthMethod · 0.45
matchesMethod · 0.45
groupMethod · 0.45

Tested by

no test coverage detected