Source:
<code>public ResourceResponse retrieveResource(URI resourceURI, Map<String, Serializable> properties) throws IOException, ResourceNotFoundException { String bytesToSkip = null; if (resourceURI == null) { LOGGER.debug("Resource URI was null"); throw new ResourceNotFoundException("Unable to find resource"); } if (properties.containsKey(BYTES_TO_SKIP)) { bytesToSkip = properties.get(BYTES_TO_SKIP).toString(); LOGGER.debug("bytesToSkip: {}", bytesToSkip); } else { bytesToSkip = "0"; } if (resourceURI.getScheme().equals(URL_HTTP_SCHEME) || resourceURI.getScheme().equals(URL_HTTPS_SCHEME)) { LOGGER.debug("Resource URI is HTTP or HTTPS"); final Serializable qualifierSerializable = properties.get(ContentItem.QUALIFIER_KEYWORD); if (qualifierSerializable != null && qualifierSerializable instanceof String) { resourceURI = setQualifierParamForUri(resourceURI, (String) qualifierSerializable); } String fileAddress = resourceURI.toURL().getFile(); LOGGER.debug("resource name: {}", fileAddress); return retrieveHttpProduct(resourceURI, fileAddress, bytesToSkip, properties); } else if (resourceURI.getScheme().equals(URL_FILE_SCHEME)) { LOGGER.debug("Resource URI is a File"); File filePathName = new File(resourceURI); if (validateFilePath(filePathName)) { String fileName = filePathName.getName(); LOGGER.debug("resource name: {}", fileName); return retrieveFileProduct(resourceURI, fileName, bytesToSkip); } else { throw new ResourceNotFoundException( "Error retrieving resource [" + resourceURI.toString() + "]. Invalid Resource URI of [" + resourceURI.toString() + "]. Resources must be in one of the following directories: " + this.rootResourceDirectories.toString()); } } else { ResourceNotFoundException ce = new ResourceNotFoundException( "Resource scheme ( " + resourceURI.getScheme() + " ) not valid. " + URLResourceReader.TITLE + " requires a scheme of " + URL_HTTP_SCHEME + " or " + URL_HTTPS_SCHEME + " or " + URL_FILE_SCHEME); throw ce; } <START> } <END></code><technical_language>This a clearer if a void method set qualifier resourceURI argument. Or, renaming method createUriWithQualifier work too</technical_language>

Target:
public ResourceResponse retrieveResource(URI resourceURI, Map<String, Serializable> properties) throws IOException, ResourceNotFoundException { String bytesToSkip = null; if (resourceURI == null) { LOGGER.debug("Resource URI was null"); throw new ResourceNotFoundException("Unable to find resource"); } if (properties.containsKey(BYTES_TO_SKIP)) { bytesToSkip = properties.get(BYTES_TO_SKIP).toString(); LOGGER.debug("bytesToSkip: {}", bytesToSkip); } else { bytesToSkip = "0"; } if (resourceURI.getScheme().equals(URL_HTTP_SCHEME) || resourceURI.getScheme().equals(URL_HTTPS_SCHEME)) { LOGGER.debug("Resource URI is HTTP or HTTPS"); final Serializable qualifierSerializable = properties.get(ContentItem.QUALIFIER_KEYWORD); if (qualifierSerializable != null && qualifierSerializable instanceof String) { resourceURI = checkUriForCorrectQualifierParamAndAppendIfNeeded( resourceURI, (String) qualifierSerializable); } String fileAddress = resourceURI.toURL().getFile(); LOGGER.debug("resource name: {}", fileAddress); return retrieveHttpProduct(resourceURI, fileAddress, bytesToSkip, properties); } else if (resourceURI.getScheme().equals(URL_FILE_SCHEME)) { LOGGER.debug("Resource URI is a File"); File filePathName = new File(resourceURI); if (validateFilePath(filePathName)) { String fileName = filePathName.getName(); LOGGER.debug("resource name: {}", fileName); return retrieveFileProduct(resourceURI, fileName, bytesToSkip); } else { throw new ResourceNotFoundException( "Error retrieving resource [" + resourceURI.toString() + "]. Invalid Resource URI of [" + resourceURI.toString() + "]. Resources must be in one of the following directories: " + this.rootResourceDirectories.toString()); } } else { ResourceNotFoundException ce = new ResourceNotFoundException( "Resource scheme ( " + resourceURI.getScheme() + " ) not valid. " + URLResourceReader.TITLE + " requires a scheme of " + URL_HTTP_SCHEME + " or " + URL_HTTPS_SCHEME + " or " + URL_FILE_SCHEME); throw ce; } }