You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2019/08/07 03:32:57 UTC
[camel] 01/03: Polished
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 23d6610b33efddc789a5b642e2e4fc3a591a35b1
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Aug 6 22:09:38 2019 +0200
Polished
---
.../org/apache/camel/test/blueprint/CamelBlueprintTestSupport.java | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintTestSupport.java b/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintTestSupport.java
index e7b7adb..c34c502 100644
--- a/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintTestSupport.java
+++ b/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintTestSupport.java
@@ -36,6 +36,7 @@ import java.util.Set;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
+import org.apache.camel.util.IOHelper;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -120,7 +121,7 @@ public abstract class CamelBlueprintTestSupport extends CamelTestSupport {
Properties initialConfiguration = new Properties();
String pid = setConfigAdminInitialConfiguration(initialConfiguration);
if (pid != null) {
- configAdminPidFiles = new String[][] {{prepareInitialConfigFile(initialConfiguration), pid}};
+ configAdminPidFiles = new String[][]{{prepareInitialConfigFile(initialConfiguration), pid}};
}
final String symbolicName = getClass().getSimpleName();
@@ -529,8 +530,6 @@ public abstract class CamelBlueprintTestSupport extends CamelTestSupport {
/**
* Create a temporary File with persisted configuration for ConfigAdmin
- * @param initialConfiguration
- * @return
*/
private String prepareInitialConfigFile(Properties initialConfiguration) throws IOException {
File dir = new File("target/etc");
@@ -540,7 +539,7 @@ public abstract class CamelBlueprintTestSupport extends CamelTestSupport {
try {
initialConfiguration.store(writer, null);
} finally {
- writer.close();
+ IOHelper.close(writer);
}
return cfg.getAbsolutePath();
}