/** * In p2 1.0 we stored URLs, in 1.1 and later we store URIs. This method will * first check for a URI, and then resort to looking for a URL attribute for * backwards compatibility. * @param attributes The attributes to parse * @param required If true, an exception is thrown if no URI or URL attribute is present */ protected URI parseURIAttribute(Attributes attributes, boolean required) { String location = parseOptionalAttribute(attributes, URI_ATTRIBUTE); URI uri = location == null ? null : XMLParser.this.uris.get(location); if (uri == null) { uri = constructURI(attributes, required, location); if (uri != null) { XMLParser.this.uris.put(location, uri); } } return uri; }