Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
8f6f1f3a
Commit
8f6f1f3a
authored
13 years ago
by
kaloyane
Browse files
Options
Downloads
Patches
Plain Diff
minor FIXME resolved: HierarchicalContent is also closed when an I/O error occurs
SVN: 21515
parent
06d31c6a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/ftp/resolver/FtpFileImpl.java
+13
-8
13 additions, 8 deletions
.../openbis/dss/generic/server/ftp/resolver/FtpFileImpl.java
with
13 additions
and
8 deletions
datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/ftp/resolver/FtpFileImpl.java
+
13
−
8
View file @
8f6f1f3a
...
...
@@ -68,17 +68,22 @@ public class FtpFileImpl extends AbstractFtpFile
public
InputStream
createInputStream
(
long
offset
)
throws
IOException
{
IHierarchicalContent
content
=
createHierarchicalContent
();
IHierarchicalContentNode
contentNode
=
getContentNodeForThisFile
(
content
);
InputStream
result
=
HierarchicalContentUtils
.
getInputStreamAutoClosingContent
(
contentNode
,
content
);
try
{
IHierarchicalContentNode
contentNode
=
getContentNodeForThisFile
(
content
);
InputStream
result
=
HierarchicalContentUtils
.
getInputStreamAutoClosingContent
(
contentNode
,
content
);
if
(
offset
>
0
)
if
(
offset
>
0
)
{
result
.
skip
(
offset
);
}
return
result
;
}
catch
(
IOException
ioex
)
{
result
.
skip
(
offset
);
content
.
close
();
return
null
;
}
return
result
;
// FIXME content is not closed if exception occurs
}
public
long
getLastModified
()
...
...
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