Commit 32ac836b authored by Thomas Bernhart's avatar Thomas Bernhart
Browse files

Remove null check from ingestBinaries

parent b97ef272
Pipeline #22050 passed with stages
in 3 minutes and 53 seconds
......@@ -92,14 +92,13 @@ class Ingester(
@Throws(FcrepoOperationFailedException::class, IOException::class, MissingMimeTypeException::class, SftpClientException::class, URISyntaxException::class)
private fun ingestBinaries(
sftpLocators: List<Pair<String, String?>>,
sftpLocators: List<Pair<String, String>>,
rdfHandler: RdfHandler,
transaction: FedoraTransactionClient
) {
sftpLocators.forEach {
val digitalInstantiationUrl = it.first
it.second.let { path ->
if (path != null) {
sftpClient.open(File(path)).use { stream ->
val binaryUri = "$digitalInstantiationUrl/${Service.BINARY_FILE_URI_PATH}"
val mimeType = rdfHandler.getMimeType(digitalInstantiationUrl)
......@@ -109,5 +108,4 @@ class Ingester(
}
}
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment