MCPcopy Create free account
hub / github.com/ReadyTalk/avian / URL

Method URL

classpath/java/net/URL.java:26–35  ·  view source on GitHub ↗
(String s)

Source from the content-addressed store, hash-verified

24 private String ref;
25
26 public URL(String s) throws MalformedURLException {
27 int colon = s.indexOf(':');
28 int slash = s.indexOf('/');
29 if (colon > 0 && (slash < 0 || colon < slash)) {
30 handler = findHandler(s.substring(0, colon));
31 handler.parseURL(this, s, colon + 1, s.length());
32 } else {
33 throw new MalformedURLException(s);
34 }
35 }
36
37 public String toString() {
38 return handler.toExternalForm(this);

Callers

nothing calls this directly

Calls 5

findHandlerMethod · 0.95
indexOfMethod · 0.65
lengthMethod · 0.65
substringMethod · 0.45
parseURLMethod · 0.45

Tested by

no test coverage detected