flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-4612) Close FileWriter using try with resources
Date Mon, 12 Sep 2016 20:25:20 GMT

    [ https://issues.apache.org/jira/browse/FLINK-4612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15485185#comment-15485185
] 

ASF GitHub Bot commented on FLINK-4612:
---------------------------------------

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


> Close FileWriter using try with resources
> -----------------------------------------
>
>                 Key: FLINK-4612
>                 URL: https://issues.apache.org/jira/browse/FLINK-4612
>             Project: Flink
>          Issue Type: Bug
>          Components: Java API
>    Affects Versions: 1.1.2
>            Reporter: Alexander Pivovarov
>            Priority: Trivial
>
> FileWriter is not closed properly in many places in the project modules



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message