Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
memoriav
Memobase 2020
services
Import Process
Fedora Ingest Service
Commits
32ac836b
Commit
32ac836b
authored
Feb 19, 2021
by
Thomas Bernhart
Browse files
Remove null check from ingestBinaries
parent
b97ef272
Pipeline
#22050
passed with stages
in 3 minutes and 53 seconds
Changes
1
Pipelines
2
Show whitespace changes
Inline
Side-by-side
src/main/kotlin/Ingester.kt
View file @
32ac836b
...
...
@@ -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(
}
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment