You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by apivovarov <gi...@git.apache.org> on 2016/09/12 05:54:26 UTC

[GitHub] flink pull request #2492: [FLINK-4612] Close FileWriter using try with resou...

GitHub user apivovarov opened a pull request:

    https://github.com/apache/flink/pull/2492

    [FLINK-4612] Close FileWriter using try with resources

    https://issues.apache.org/jira/browse/FLINK-4612

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apivovarov/flink FLINK-4612

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/2492.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 #2492
    
----
commit 3b1a73cb47fb4581e169f2ea5cfaa69d9f4a1c64
Author: Alexander Pivovarov <ap...@gmail.com>
Date:   2016-09-12T05:46:55Z

    [FLINK-4612] Close FileWriter using try with resources

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #2492: [FLINK-4612] Close FileWriter using try with resou...

Posted by apivovarov <gi...@git.apache.org>.
Github user apivovarov commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2492#discussion_r78447379
  
    --- Diff: flink-core/src/test/java/org/apache/flink/testutils/TestFileUtils.java ---
    @@ -55,11 +55,8 @@ public static String createTempFileInDirectory(String dir, String contents) thro
     		f.createNewFile();
     		f.deleteOnExit();
     		
    -		BufferedWriter out = new BufferedWriter(new FileWriter(f));
    -		try { 
    +		try(BufferedWriter out = new BufferedWriter(new FileWriter(f))) {
    --- End diff --
    
    Thank you. Just fixed that


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #2492: [FLINK-4612] Close FileWriter using try with resources

Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on the issue:

    https://github.com/apache/flink/pull/2492
  
    merging


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #2492: [FLINK-4612] Close FileWriter using try with resou...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/flink/pull/2492


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #2492: [FLINK-4612] Close FileWriter using try with resou...

Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2492#discussion_r78430845
  
    --- Diff: flink-core/src/test/java/org/apache/flink/testutils/TestFileUtils.java ---
    @@ -55,11 +55,8 @@ public static String createTempFileInDirectory(String dir, String contents) thro
     		f.createNewFile();
     		f.deleteOnExit();
     		
    -		BufferedWriter out = new BufferedWriter(new FileWriter(f));
    -		try { 
    +		try(BufferedWriter out = new BufferedWriter(new FileWriter(f))) {
    --- End diff --
    
    there should be a space after try; same issue occurs in other places as well.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---