Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mediaconch_plugin4rosetta
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Harbor Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Digital Preservation
mediaconch_plugin4rosetta
Commits
4c51eca6
Commit
4c51eca6
authored
5 months ago
by
Gerald Hübsch
Browse files
Options
Downloads
Patches
Plain Diff
free resources of the buffered reader stream in all situations
parent
f285daee
No related branches found
No related tags found
No related merge requests found
Pipeline
#9007
failed
5 months ago
Stage: build
Stage: test
Stage: packaging
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
java/org/slub/rosetta/dps/repository/plugin/SLUBMatroskaFFV1FormatValidationPlugin.java
+9
-4
9 additions, 4 deletions
...sitory/plugin/SLUBMatroskaFFV1FormatValidationPlugin.java
with
9 additions
and
4 deletions
java/org/slub/rosetta/dps/repository/plugin/SLUBMatroskaFFV1FormatValidationPlugin.java
+
9
−
4
View file @
4c51eca6
...
...
@@ -108,10 +108,11 @@ public class SLUBMatroskaFFV1FormatValidationPlugin implements FormatValidationP
private
void
callMediaconch
(
String
filePath
,
String
profilePath
)
{
String
execstring
=
this
.
mediaconch_binary_path
+
" "
+
filePath
+
" -p "
+
profilePath
;
log
.
info
(
"executing: "
+
execstring
);
final
AtomicBoolean
fuse
=
new
AtomicBoolean
(
true
);
final
AtomicBoolean
fuse
=
new
AtomicBoolean
(
true
);
final
BufferedReader
procOutputReader
=
null
;
try
{
Process
p
=
Runtime
.
getRuntime
().
exec
(
execstring
);
BufferedReader
procOutputReader
=
new
BufferedReader
(
new
InputStreamReader
(
p
.
getInputStream
()));
procOutputReader
=
new
BufferedReader
(
new
InputStreamReader
(
p
.
getInputStream
()));
final
ArrayList
<
String
>
procOutputLineList
=
new
ArrayList
<
String
>();
...
...
@@ -170,8 +171,7 @@ public class SLUBMatroskaFFV1FormatValidationPlugin implements FormatValidationP
System
.
out
.
println
(
"MEDIACONCH line: "
+
line
);
validationLog
.
add
(
line
);
log
.
info
(
line
);
}
procOutputReader
.
close
();
}
}
catch
(
IOException
e
)
{
log
.
error
(
"(actual) mediaconch not available, path="
+
this
.
mediaconch_binary_path
+
", "
,
e
.
getMessage
());
System
.
out
.
println
(
"ERROR: (actual) mediaconch not available, path="
+
this
.
mediaconch_binary_path
+
", "
+
e
.
getMessage
());
...
...
@@ -181,6 +181,11 @@ public class SLUBMatroskaFFV1FormatValidationPlugin implements FormatValidationP
}
finally
{
// ensure the while loop of procOutputReaderThread terminates under all circumstances
fuse
.
set
(
false
);
// cleanup all resources
if
(
procOutputReader
!=
null
)
{
procOutputReader
.
close
();
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment