You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2023/01/13 13:23:58 UTC

[camel] branch main updated: Camel-Flink - Use Java.nio.Files instead of java.io.File to create temporary file

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 2440731ee2a Camel-Flink - Use Java.nio.Files instead of java.io.File to create temporary file
2440731ee2a is described below

commit 2440731ee2a22c6512b6158b57f93ca491b2134b
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Jan 13 14:21:50 2023 +0100

    Camel-Flink - Use Java.nio.Files instead of java.io.File to create temporary file
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .../test/java/org/apache/camel/component/flink/FlinkProducerTest.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/components/camel-flink/src/test/java/org/apache/camel/component/flink/FlinkProducerTest.java b/components/camel-flink/src/test/java/org/apache/camel/component/flink/FlinkProducerTest.java
index 46856e8b908..42724f4dff8 100644
--- a/components/camel-flink/src/test/java/org/apache/camel/component/flink/FlinkProducerTest.java
+++ b/components/camel-flink/src/test/java/org/apache/camel/component/flink/FlinkProducerTest.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.flink;
 
 import java.io.File;
 import java.io.IOException;
+import java.nio.file.Files;
 import java.util.Arrays;
 
 import org.apache.camel.BindToRegistry;
@@ -121,7 +122,7 @@ public class FlinkProducerTest extends CamelTestSupport {
 
     @Test
     public void shouldExecuteVoidCallback() throws IOException {
-        final File output = File.createTempFile("camel", "flink");
+        final File output = Files.createTempFile("camel", "flink").toFile();
         output.delete();
 
         template.sendBodyAndHeader(flinkDataSetUri, null, FlinkConstants.FLINK_DATASET_CALLBACK_HEADER,