flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zentol <...@git.apache.org>
Subject [GitHub] flink pull request #2492: [FLINK-4612] Close FileWriter using try with resou...
Date Mon, 12 Sep 2016 18:45:53 GMT
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.
---

Mime
View raw message