Like {@link #resolve} but returns null rather than a fallback URL in case there is no special avatar.
@since 1.518
971436
public static @CheckForNull String resolveOrNull(User u, String avatarSize) {
        Matcher matcher = iconSizeRegex.matcher(avatarSize);
        if (matcher.matches() && matcher.groupCount() == 2) {
            int width = Integer.parseInt(matcher.group(1));
            int height = Integer.parseInt(matcher.group(2));
            for (UserAvatarResolver r : all()) {
                String name = r.findAvatarFor(u, width, height);
                if(name!=null) return name;
            }
        } else {
            LOGGER.warning(String.format("Could not split up the avatar size (%s) into a width and height.", avatarSize));
        }

        return null;
    }
493519
@Override
    public Extension resolve(ExtensionId extensionId) throws ResolveException
    {
        try {
            return resolve(extensionId.getId(), extensionId.getVersion());
        } catch (ResourceNotFoundException e) {
            throw new ExtensionNotFoundException("Could not find extension [" + extensionId + "]", e);
        } catch (Exception e) {
            throw new ResolveException("Failed to create extension object for extension [" + extensionId + "]", e);
        }
    }
1182341
function getUnresolvedIconPath (value) {
  const relativePathResult = urlRegexp.exec(value);
  if (!relativePathResult) {
    throw new Error(`Could not parse url "${value}".`);
  }
  return relativePathResult[2] || relativePathResult[3] || relativePathResult[4];
}
1355515
public static String parseBundleId(String url) {
        if (isOsgiBundleUrl(url)) {
            int slashesIdx = url.indexOf("://");
            return url.substring(slashesIdx + "://".length(), url.indexOf('.'));
        } else {
            return null;
        }
    }
757409
@Override
  public InputSource resolveEntity(String publicId, String systemId)
  {
    String r = map.get(publicId);
    return r == null ? null : new InputSource(Resources.stream(r));
  }
1254584
public void resolve(@Nullable View view, @NonNull HttpRequest request, @NonNull HttpResponse response) {
        if (view == null) return;

        Object output = view.output();
        if (output == null) return;

        if (view.rest()) {
            resolveRest(output, request, response);
        } else {
            resolvePath(output, request, response);
        }
    }
851925
function resolve(ref, context) {
    if (typeof ref !== 'string') return ref;
    if (/^#/.test(ref)) { ref = (context._href || '/') + ref; }
    return generator.fragment$[ref];
  }
653004
public String index() throws IOException {
    String userName = get("user.name");
    if (Strings.isEmpty(userName)) { return null; }
    Avatar avatar = avatarBase.getAvatar(userName);
    if (null == avatar) {
      avatar = avatarBase.getDefaultAvatar();
    }
    AvatarUtil.copyTo(avatar, ServletActionContext.getResponse());
    return null;
  }
1061188
public String getNewAvatarUrl()
    {
        return next == null ? null : String.format(AVATAR_URL, getSelfUser().getId(), next, next.startsWith("a_") ? ".gif" : ".png");
    }
924732
@Override
  public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {

    String filename = xhtmlResourceMap.get(publicId);
    if (filename != null) {
      String resourceName = resourceFolder + "/" + filename;
      InputStream is = XHtmlEntityResolver.class.getResourceAsStream(resourceName);

      if (is == null) {
        throw new IOException("Resource '" + resourceName + "' not found in class path.");
      }

      return new InputSource(is);
    }

    return null;
  }
284010
public static String resolveURI(final String baseURI, final Parent parent, String url) {

        if (!resolveURIs) {
            return url;
        }

        if (isRelativeURI(url)) {

            if (".".equals(url) || "./".equals(url)) {
                url = "";
            }

            if (url.startsWith("/") && baseURI != null) {
                String base = null;
                final int slashslash = baseURI.indexOf("//");
                final int nextslash = baseURI.indexOf("/", slashslash + 2);
                if (nextslash != -1) {
                    base = baseURI.substring(0, nextslash);
                }
                return formURI(base, url);
            }

            // Relative URI with parent
            if (parent != null && parent instanceof Element) {

                // Do we have an xml:base?
                String xmlbase = ((Element) parent).getAttributeValue("base", Namespace.XML_NAMESPACE);
                if (xmlbase != null && xmlbase.trim().length() > 0) {
                    if (isAbsoluteURI(xmlbase)) {
                        // Absolute xml:base, so form URI right now
                        if (url.startsWith("/")) {
                            // Host relative URI
                            final int slashslash = xmlbase.indexOf("//");
                            final int nextslash = xmlbase.indexOf("/", slashslash + 2);
                            if (nextslash != -1) {
                                xmlbase = xmlbase.substring(0, nextslash);
                            }
                            return formURI(xmlbase, url);
                        }
                        if (!xmlbase.endsWith("/")) {
                            // Base URI is filename, strip it off
                            xmlbase = xmlbase.substring(0, xmlbase.lastIndexOf("/"));
                        }
                        return formURI(xmlbase, url);
                    } else {
                        // Relative xml:base, so walk up tree
                        return resolveURI(baseURI, parent.getParent(), stripTrailingSlash(xmlbase) + "/" + stripStartingSlash(url));
                    }
                }
                // No xml:base so walk up tree
                return resolveURI(baseURI, parent.getParent(), url);

                // Relative URI with no parent (i.e. top of tree), so form URI
                // right now
            } else if (parent == null || parent instanceof Document) {
                return formURI(baseURI, url);
            }
        }

        return url;

    }
497278
@Override
   public Bitmap  resolveImage(String filename)
   {
      Log.i(TAG, "resolveImage("+filename+")");

      try
      {
         InputStream  istream = assetManager.open(filename);
         return BitmapFactory.decodeStream(istream);
      }
      catch (IOException e1)
      {
         return null;
      }
   }
279470
function resolve(from, to) {
  var objFrom = parse(from);
  var objTo = parse(to);

  if (objFrom.kind === 'url' && objTo.kind === 'url') {
    return format(parse(url.resolve(from, to)));
  }

  if (objFrom.kind === 'urn') {
    // In our world all URNs are absolute (if they weren’t they’d be
    // seen as a non-absolute URL).

    if (objTo.kind === 'urn') {
      return format(objTo);
    }

    // "from" is a urn and "to" is a url
    if (objTo.kind === 'url' && objTo.absolute) {
      return format(objTo);
    } else {
      if (objFrom.pathname) {
        objFrom.pathname = url.resolve(objFrom.pathname, objTo.baseUri);
      }
      objFrom.baseUri = objFrom.host + (objFrom.pathname || '');
      objFrom.fragment = objTo.fragment;
      return format(objFrom);
    }
  } else {
    // "from" is a url and "to" is a urn (!)
    return format(objTo);
  }
}
941024
@Override
    public Object resolveObject(@Sensitive Object object) throws IOException {
        if (object instanceof JavaURLContextReplacement) {
            try {
                JavaURLContextReplacement replacement = (JavaURLContextReplacement) object;
                JavaURLContext ctx = factory.createJavaURLContext(replacement.getEnv(), new JavaURLName(replacement.getBase()));
                return ctx;
            } catch (NamingException ex) {
                throw new IOException(ex.getMessage(), ex);
            }

        }
        return null;
    }
89832
@Override
	public String resolveVariant(HttpServletRequest request) {

		String browser = null;
		String userAgent = request.getHeader("User-Agent");
		if (userAgent != null) {
			Matcher matcher = IE_PATTERN.matcher(userAgent);
			if (matcher.find()) {
				browser = "ie" + matcher.group(1);
			} else if (userAgent.contains("AppleWebKit")) {
				browser = "webkit";
			} else if (userAgent.contains("Firefox")) {
				browser = "firefox";
			} else if (userAgent.contains("Opera")) {
				browser = "opera";
			}
		}

		return browser;
	}
810435
public function resolve()
    {
        $httpHost = $this->request->getHttpHost();
        $domains = explode('.', $httpHost);
        $level = config('localizer.domain.level', 3);

        return ($total = count($domains)) >= $level ? $domains[$total - $level] : null;
    }
255669
public ResourceAddress resolve(String... wildcards) {
        return resolve(new StatementContext() {
            @Override
            public String get(String key) {
                return null;
            }

            @Override
            public String[] getTuple(String key) {
                return null;
            }

            @Override
            public String resolve(String key) {
                return null;
            }

            @Override
            public String[] resolveTuple(String key) {
                return null;
            }

            @Override
            public LinkedList<String> collect(String key) {
                return null;
            }

            @Override
            public LinkedList<String[]> collectTuples(String key) {
                return null;
            }
        }, wildcards);
    }