You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Dmitrii Kniazev (JIRA)" <ji...@apache.org> on 2017/02/06 16:11:41 UTC
[jira] [Commented] (FLINK-5629) Unclosed RandomAccessFile in
StaticFileServerHandler#respondAsLeader()
[ https://issues.apache.org/jira/browse/FLINK-5629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15854275#comment-15854275 ]
Dmitrii Kniazev commented on FLINK-5629:
----------------------------------------
This code has comment
{code:title=StaticFileServerHandler.java|borderStyle=solid}
// Don't need to close this manually. Netty's DefaultFileRegion will take care of it.
final RandomAccessFile raf;
try {
raf = new RandomAccessFile(file, "r");
}
catch (FileNotFoundException e) {
sendError(ctx, NOT_FOUND);
return;
}
long fileLength = raf.length();
{code}
I think this bug may be closed
> Unclosed RandomAccessFile in StaticFileServerHandler#respondAsLeader()
> ----------------------------------------------------------------------
>
> Key: FLINK-5629
> URL: https://issues.apache.org/jira/browse/FLINK-5629
> Project: Flink
> Issue Type: Bug
> Components: Webfrontend
> Reporter: Ted Yu
> Priority: Minor
>
> {code}
> final RandomAccessFile raf;
> try {
> raf = new RandomAccessFile(file, "r");
> ...
> long fileLength = raf.length();
> {code}
> The RandomAccessFile should be closed upon return from method.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)