MCPcopy Create free account
hub / github.com/davidgiven/luje / validateUserinfo

Method validateUserinfo

lib/java/net/URI.java:554–563  ·  view source on GitHub ↗
(String uri, String userinfo, int index)

Source from the content-addressed store, hash-verified

552 }
553
554 private void validateUserinfo(String uri, String userinfo, int index)
555 throws URISyntaxException {
556 for (int i = 0; i < userinfo.length(); i++) {
557 char ch = userinfo.charAt(i);
558 if (ch == ']' || ch == '[') {
559 throw new URISyntaxException(uri, Messages.getString("luni.8C"), //$NON-NLS-1$
560 index + i);
561 }
562 }
563 }
564
565 /**
566 * distinguish between IPv4, IPv6, domain name and validate it based on

Callers 1

parseAuthorityMethod · 0.95

Calls 3

getStringMethod · 0.95
lengthMethod · 0.65
charAtMethod · 0.65

Tested by

no test coverage detected