[jira] [Commented] (FLINK-2605) Unclosed RandomAccessFile may leak resource in StaticFileServerHandler
[ https://issues.apache.org/jira/browse/FLINK-2605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14731850#comment-14731850 ] ASF GitHub Bot commented on FLINK-2605: --- Github user chiwanpark commented on the pull request: https://github.com/apache/flink/pull/1089#issuecomment-137923702 +1 Merging... > Unclosed RandomAccessFile may leak resource in StaticFileServerHandler > -- > > Key: FLINK-2605 > URL: https://issues.apache.org/jira/browse/FLINK-2605 > Project: Flink > Issue Type: Bug >Reporter: Ted Yu > Attachments: flink-2605-v1.txt > > > {code} > final RandomAccessFile raf; > try { > raf = new RandomAccessFile(file, "r"); > } > catch (FileNotFoundException e) { > sendError(ctx, NOT_FOUND); > return; > } > {code} > If there is exception after raf is created but before method returns, raf > would be left unclosed. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-2605) Unclosed RandomAccessFile may leak resource in StaticFileServerHandler
[ https://issues.apache.org/jira/browse/FLINK-2605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14731852#comment-14731852 ] ASF GitHub Bot commented on FLINK-2605: --- Github user asfgit closed the pull request at: https://github.com/apache/flink/pull/1089 > Unclosed RandomAccessFile may leak resource in StaticFileServerHandler > -- > > Key: FLINK-2605 > URL: https://issues.apache.org/jira/browse/FLINK-2605 > Project: Flink > Issue Type: Bug >Reporter: Ted Yu > Attachments: flink-2605-v1.txt > > > {code} > final RandomAccessFile raf; > try { > raf = new RandomAccessFile(file, "r"); > } > catch (FileNotFoundException e) { > sendError(ctx, NOT_FOUND); > return; > } > {code} > If there is exception after raf is created but before method returns, raf > would be left unclosed. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-2605) Unclosed RandomAccessFile may leak resource in StaticFileServerHandler
[ https://issues.apache.org/jira/browse/FLINK-2605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14730974#comment-14730974 ] ASF GitHub Bot commented on FLINK-2605: --- Github user tedyu commented on the pull request: https://github.com/apache/flink/pull/1089#issuecomment-137772269 Your reasoning w.r.t. current scope of try block was the same as mine. I think it is good to make the scope as accurate as possible. Generally speaking, we don't want to react to unrelated exception. Please keep the current formation. > Unclosed RandomAccessFile may leak resource in StaticFileServerHandler > -- > > Key: FLINK-2605 > URL: https://issues.apache.org/jira/browse/FLINK-2605 > Project: Flink > Issue Type: Bug >Reporter: Ted Yu > Attachments: flink-2605-v1.txt > > > {code} > final RandomAccessFile raf; > try { > raf = new RandomAccessFile(file, "r"); > } > catch (FileNotFoundException e) { > sendError(ctx, NOT_FOUND); > return; > } > {code} > If there is exception after raf is created but before method returns, raf > would be left unclosed. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-2605) Unclosed RandomAccessFile may leak resource in StaticFileServerHandler
[ https://issues.apache.org/jira/browse/FLINK-2605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14731459#comment-14731459 ] ASF GitHub Bot commented on FLINK-2605: --- Github user hsaputra commented on the pull request: https://github.com/apache/flink/pull/1089#issuecomment-137857005 +1 LGTM > Unclosed RandomAccessFile may leak resource in StaticFileServerHandler > -- > > Key: FLINK-2605 > URL: https://issues.apache.org/jira/browse/FLINK-2605 > Project: Flink > Issue Type: Bug >Reporter: Ted Yu > Attachments: flink-2605-v1.txt > > > {code} > final RandomAccessFile raf; > try { > raf = new RandomAccessFile(file, "r"); > } > catch (FileNotFoundException e) { > sendError(ctx, NOT_FOUND); > return; > } > {code} > If there is exception after raf is created but before method returns, raf > would be left unclosed. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-2605) Unclosed RandomAccessFile may leak resource in StaticFileServerHandler
[ https://issues.apache.org/jira/browse/FLINK-2605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14731322#comment-14731322 ] ASF GitHub Bot commented on FLINK-2605: --- Github user StephanEwen commented on the pull request: https://github.com/apache/flink/pull/1089#issuecomment-137837300 +1 > Unclosed RandomAccessFile may leak resource in StaticFileServerHandler > -- > > Key: FLINK-2605 > URL: https://issues.apache.org/jira/browse/FLINK-2605 > Project: Flink > Issue Type: Bug >Reporter: Ted Yu > Attachments: flink-2605-v1.txt > > > {code} > final RandomAccessFile raf; > try { > raf = new RandomAccessFile(file, "r"); > } > catch (FileNotFoundException e) { > sendError(ctx, NOT_FOUND); > return; > } > {code} > If there is exception after raf is created but before method returns, raf > would be left unclosed. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-2605) Unclosed RandomAccessFile may leak resource in StaticFileServerHandler
[ https://issues.apache.org/jira/browse/FLINK-2605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14730930#comment-14730930 ] ASF GitHub Bot commented on FLINK-2605: --- Github user uce commented on the pull request: https://github.com/apache/flink/pull/1089#issuecomment-137761664 Thanks for the PR. The change looks good. It is good to merge. The following comment is optional to address: I understand that you didn't add the last two statements to the catch block as they don't depend on the `RandomAccessFile`, but I think it increases readability if they are part of it. What do you think about this? > Unclosed RandomAccessFile may leak resource in StaticFileServerHandler > -- > > Key: FLINK-2605 > URL: https://issues.apache.org/jira/browse/FLINK-2605 > Project: Flink > Issue Type: Bug >Reporter: Ted Yu > Attachments: flink-2605-v1.txt > > > {code} > final RandomAccessFile raf; > try { > raf = new RandomAccessFile(file, "r"); > } > catch (FileNotFoundException e) { > sendError(ctx, NOT_FOUND); > return; > } > {code} > If there is exception after raf is created but before method returns, raf > would be left unclosed. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-2605) Unclosed RandomAccessFile may leak resource in StaticFileServerHandler
[ https://issues.apache.org/jira/browse/FLINK-2605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14729116#comment-14729116 ] ASF GitHub Bot commented on FLINK-2605: --- GitHub user tedyu opened a pull request: https://github.com/apache/flink/pull/1089 FLINK-2605 Unclosed RandomAccessFile may leak resource in StaticFileS… …erverHandler You can merge this pull request into a Git repository by running: $ git pull https://github.com/tedyu/flink master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/1089.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1089 commit d900be453f9ebac68bcf7e4c75b8d80d0fa8b2c5 Author: tedyuDate: 2015-09-03T14:11:32Z FLINK-2605 Unclosed RandomAccessFile may leak resource in StaticFileServerHandler > Unclosed RandomAccessFile may leak resource in StaticFileServerHandler > -- > > Key: FLINK-2605 > URL: https://issues.apache.org/jira/browse/FLINK-2605 > Project: Flink > Issue Type: Bug >Reporter: Ted Yu > Attachments: flink-2605-v1.txt > > > {code} > final RandomAccessFile raf; > try { > raf = new RandomAccessFile(file, "r"); > } > catch (FileNotFoundException e) { > sendError(ctx, NOT_FOUND); > return; > } > {code} > If there is exception after raf is created but before method returns, raf > would be left unclosed. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-2605) Unclosed RandomAccessFile may leak resource in StaticFileServerHandler
[ https://issues.apache.org/jira/browse/FLINK-2605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14728730#comment-14728730 ] Ufuk Celebi commented on FLINK-2605: Yes. This is part of the new web interface, which is only part of the current snapshot (upcoming 0.10 release). That one requires Java >= 7. > Unclosed RandomAccessFile may leak resource in StaticFileServerHandler > -- > > Key: FLINK-2605 > URL: https://issues.apache.org/jira/browse/FLINK-2605 > Project: Flink > Issue Type: Bug >Reporter: Ted Yu > Attachments: flink-2605-v1.txt > > > {code} > final RandomAccessFile raf; > try { > raf = new RandomAccessFile(file, "r"); > } > catch (FileNotFoundException e) { > sendError(ctx, NOT_FOUND); > return; > } > {code} > If there is exception after raf is created but before method returns, raf > would be left unclosed. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-2605) Unclosed RandomAccessFile may leak resource in StaticFileServerHandler
[ https://issues.apache.org/jira/browse/FLINK-2605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14728729#comment-14728729 ] Chiwan Park commented on FLINK-2605: Nice catch, [~tedyu]. If you want your patch to submit, please create a pull request in [github|http://github.com/apache/flink]. > Unclosed RandomAccessFile may leak resource in StaticFileServerHandler > -- > > Key: FLINK-2605 > URL: https://issues.apache.org/jira/browse/FLINK-2605 > Project: Flink > Issue Type: Bug >Reporter: Ted Yu > Attachments: flink-2605-v1.txt > > > {code} > final RandomAccessFile raf; > try { > raf = new RandomAccessFile(file, "r"); > } > catch (FileNotFoundException e) { > sendError(ctx, NOT_FOUND); > return; > } > {code} > If there is exception after raf is created but before method returns, raf > would be left unclosed. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-2605) Unclosed RandomAccessFile may leak resource in StaticFileServerHandler
[ https://issues.apache.org/jira/browse/FLINK-2605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14727404#comment-14727404 ] Stephan Ewen commented on FLINK-2605: - Good observation, thank you! Do you want to prepare a fix for this? > Unclosed RandomAccessFile may leak resource in StaticFileServerHandler > -- > > Key: FLINK-2605 > URL: https://issues.apache.org/jira/browse/FLINK-2605 > Project: Flink > Issue Type: Bug >Reporter: Ted Yu > > {code} > final RandomAccessFile raf; > try { > raf = new RandomAccessFile(file, "r"); > } > catch (FileNotFoundException e) { > sendError(ctx, NOT_FOUND); > return; > } > {code} > If there is exception after raf is created but before method returns, raf > would be left unclosed. -- This message was sent by Atlassian JIRA (v6.3.4#6332)