CAMEL-11778: Polished

Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/2e11ef53
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/2e11ef53
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/2e11ef53

Branch: refs/heads/master
Commit: 2e11ef536e591b12f5bc3dd624b3bcdd05f0c149
Parents: c91fded
Author: Claus Ibsen <davscl...@apache.org>
Authored: Sat Sep 23 09:16:03 2017 +0200
Committer: Claus Ibsen <davscl...@apache.org>
Committed: Sat Sep 23 09:16:03 2017 +0200

----------------------------------------------------------------------
 components/camel-ldif/pom.xml                   | 166 +++++++++----------
 .../src/main/docs/ldif-component.adoc           |  69 ++++----
 .../camel/component/ldif/LdifComponent.java     |   5 -
 .../camel/component/ldif/LdifEndpoint.java      |  10 +-
 .../camel/component/ldif/LdifProducer.java      |  63 ++-----
 .../src/test/resources/log4j2-test.xml          |  46 -----
 .../src/test/resources/log4j2.properties        |  28 ++++
 .../springboot/LdifComponentConfiguration.java  |   4 +-
 8 files changed, 154 insertions(+), 237 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/2e11ef53/components/camel-ldif/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-ldif/pom.xml b/components/camel-ldif/pom.xml
index 887d4c1..fdc36c8 100644
--- a/components/camel-ldif/pom.xml
+++ b/components/camel-ldif/pom.xml
@@ -17,97 +17,91 @@
     limitations under the License.
 
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
-    <modelVersion>4.0.0</modelVersion>
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
 
-    <parent>
-        <groupId>org.apache.camel</groupId>
-        <artifactId>components</artifactId>
-        <version>2.20.0-SNAPSHOT</version>
-    </parent>
+  <parent>
+    <groupId>org.apache.camel</groupId>
+    <artifactId>components</artifactId>
+    <version>2.20.0-SNAPSHOT</version>
+  </parent>
 
-    <artifactId>camel-ldif</artifactId>
-    <packaging>jar</packaging>
-    <name>Camel :: LDIF</name>
-    <description>Camel LDIF support</description>
+  <artifactId>camel-ldif</artifactId>
+  <packaging>jar</packaging>
+  <name>Camel :: LDIF</name>
+  <description>Camel LDIF support</description>
 
-    <properties>
-        
<camel.osgi.export.pkg>org.apache.camel.component.ldif.*</camel.osgi.export.pkg>
-        
<camel.osgi.export.service>org.apache.camel.spi.ComponentResolver;component=ldif</camel.osgi.export.service>
-    </properties>
+  <properties>
+    
<camel.osgi.export.pkg>org.apache.camel.component.ldif.*</camel.osgi.export.pkg>
+    
<camel.osgi.export.service>org.apache.camel.spi.ComponentResolver;component=ldif</camel.osgi.export.service>
+  </properties>
 
-    <dependencies>
+  <dependencies>
 
-        <dependency>
-            <groupId>org.apache.camel</groupId>
-            <artifactId>camel-core</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.directory.server</groupId>
-            <artifactId>apacheds-core-api</artifactId>
-            <version>${apacheds-version}</version>
-            <exclusions>
-              <exclusion>
-                <groupId>org.slf4j</groupId>
-                <artifactId>slf4j-api</artifactId>
-              </exclusion>
-            </exclusions>
-        </dependency>
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-core</artifactId>
+    </dependency>
 
-        <!-- test dependencies -->
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.camel</groupId>
-            <artifactId>camel-test</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.directory.server</groupId>
-            <artifactId>apacheds-server-integ</artifactId>
-            <version>${apacheds-version}</version>
-            <scope>test</scope>
-            <exclusions>
-              <exclusion>
-                <groupId>log4j</groupId>
-                <artifactId>log4j</artifactId>
-              </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.directory.server</groupId>
-            <artifactId>apacheds-core-integ</artifactId>
-            <version>${apacheds-version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.mina</groupId>
-            <artifactId>mina-core</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.logging.log4j</groupId>
-            <artifactId>log4j-api</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.logging.log4j</groupId>
-            <artifactId>log4j-core</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.logging.log4j</groupId>
-            <artifactId>log4j-slf4j-impl</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.logging.log4j</groupId>
-            <artifactId>log4j-1.2-api</artifactId>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
+    <dependency>
+      <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-core-api</artifactId>
+      <version>${apacheds-version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.slf4j</groupId>
+          <artifactId>slf4j-api</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+
+    <!-- test dependencies -->
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-test</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-server-integ</artifactId>
+      <version>${apacheds-version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>log4j</groupId>
+          <artifactId>log4j</artifactId>
+        </exclusion>
+      </exclusions>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-core-integ</artifactId>
+      <version>${apacheds-version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.mina</groupId>
+      <artifactId>mina-core</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <!-- logging -->
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-api</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-slf4j-impl</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
 
 </project>

http://git-wip-us.apache.org/repos/asf/camel/blob/2e11ef53/components/camel-ldif/src/main/docs/ldif-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-ldif/src/main/docs/ldif-component.adoc 
b/components/camel-ldif/src/main/docs/ldif-component.adoc
index 2b218ce..5152dbe 100644
--- a/components/camel-ldif/src/main/docs/ldif-component.adoc
+++ b/components/camel-ldif/src/main/docs/ldif-component.adoc
@@ -1,36 +1,38 @@
 == LDIF Component
 
-*Available as of Camel version 1.0*
+*Available as of Camel version 2.20*
 
 The *ldif* component allows you to do updates on an LDAP server
-from a LDIF body content. +
- This component uses a basic URL syntax to access the server. It uses
+from a LDIF body content.
+
+This component uses a basic URL syntax to access the server. It uses
 the Apache DS LDAP library to process the LDIF. After processing the LDIF,
 the response body will be a list of statuses for success/failure of each
 entry.
 
-Note that the Apache LDAP API is very sensitive to LDIF syntax errors. If in 
doubt,
+[NOTE]
+The Apache LDAP API is very sensitive to LDIF syntax errors. If in doubt,
 refer to the unit tests to see an example of each change type.
 
 Maven users will need to add the following dependency to their `pom.xml`
 for this component:
 
 [source,xml]
-------------------------------------------------------------
+----
 <dependency>
     <groupId>org.apache.camel</groupId>
     <artifactId>camel-ldif</artifactId>
     <version>x.x.x</version>
     <!-- use the same version as your Camel core version -->
 </dependency>
-------------------------------------------------------------
+----
 
-### URI format
+=== URI format
 
-[source,java]
-----------------------------------------
+[source]
+----
 ldap:ldapServerBean[?options]
-----------------------------------------
+----
 
 The _ldapServerBean_ portion of the URI refers to a
 
https://directory.apache.org/api/gen-docs/latest/apidocs/org/apache/directory/ldap/client/api/LdapConnection.html[LdapConnection].
@@ -44,7 +46,7 @@ of setting up a custom SocketFactory instance.
 You can append query options to the URI in the following format,
 `?option=value&option=value&...`
 
-### Options
+=== Options
 
 // component options: START
 The LDIF component has no options.
@@ -76,24 +78,24 @@ with the following path and query parameters:
 |===
 // endpoint options: END
 
-### Body types:
+=== Body types:
 
 The body can be a URL to an LDIF file or an inline LDIF file. To signify the 
difference
 in body types, an inline LDIF must start with:
 
-[source,ldif]
------------
+[source]
+----
 version: 1
------------
+----
 
 If not, the component will try to parse the body as a URL.
 
-### Result
+=== Result
 
 The result is returned in the Out body as a `ArrayList<java.lang.String>` 
object.
 This contains either "success" or an Exception message for each LDIF entry.
 
-### LdapConnection
+=== LdapConnection
 
 The URI, `ldif:ldapConnectionName`, references a bean with the ID,
 `ldapConnectionName`. The ldapConnection can be configured using a
@@ -104,7 +106,7 @@ stale connection.
 The `LdapConnection` bean may be defined as follows in Spring XML:
 
 [source,xml]
---------------------------------------------------------------------------------------------------
+----
 <bean id="ldapConnectionOptions" 
class="org.apache.directory.ldap.client.api.LdapConnectionConfig">
   <property name="ldapHost" value="${ldap.host}"/>
   <property name="ldapPort" value="${ldap.port}"/>
@@ -119,10 +121,10 @@ The `LdapConnection` bean may be defined as follows in 
Spring XML:
 </bean>
 
 <bean id="ldapConnection" factory-bean="ldapConnectionFactory" 
factory-method="newLdapConnection" scope="prototype"/>
---------------------------------------------------------------------------------------------------
+----
 
-or in a blueprint.xml:
---------------------------------------------------------------------------------------------------
+or in a OSGi blueprint.xml:
+----
 <bean id="ldapConnectionOptions" 
class="org.apache.directory.ldap.client.api.LdapConnectionConfig">
   <property name="ldapHost" value="${ldap.host}"/>
   <property name="ldapPort" value="${ldap.port}"/>
@@ -137,29 +139,25 @@ or in a blueprint.xml:
 </bean>
 
 <bean id="ldapConnection" factory-ref="ldapConnectionFactory" 
factory-method="newLdapConnection" scope="prototype"/>
---------------------------------------------------------------------------------------------------
+----
 
 
-### Samples
+=== Samples
 
 Following on from the Spring configuration above, the code sample below
 sends an LDAP request to filter search a group for a member. The Common
 Name is then extracted from the response.
 
 [source,java]
-----------------------------------------------------------
-ProducerTemplate<Exchange> template = exchange
-  .getContext().createProducerTemplate();
+----
+ProducerTemplate<Exchange> template = 
exchange.getContext().createProducerTemplate();
 
-List<?> results = (Collection<?>) (template
-  .sendBody(
-    "ldap:ldapConnection,
-    "FIXME - inline LDIF"));
+List<?> results = (Collection<?>) template.sendBody("ldap:ldapConnection, 
"LDiff goes here");
 
 if (results.size() > 0) {
   // Check for no errors
 
-  for (String result: results) {
+  for (String result : results) {
     if ("success".equalTo(result)) {
       // LDIF entry success
     } else {
@@ -167,12 +165,5 @@ if (results.size() > 0) {
     }
   }
 }
-----------------------------------------------------------
-
-### See Also
-
-* link:configuring-camel.html[Configuring Camel]
-* link:component.html[Component]
-* link:endpoint.html[Endpoint]
+----
 
-* link:getting-started.html[Getting Started]

http://git-wip-us.apache.org/repos/asf/camel/blob/2e11ef53/components/camel-ldif/src/main/java/org/apache/camel/component/ldif/LdifComponent.java
----------------------------------------------------------------------
diff --git 
a/components/camel-ldif/src/main/java/org/apache/camel/component/ldif/LdifComponent.java
 
b/components/camel-ldif/src/main/java/org/apache/camel/component/ldif/LdifComponent.java
index 6f5e073..8457353 100644
--- 
a/components/camel-ldif/src/main/java/org/apache/camel/component/ldif/LdifComponent.java
+++ 
b/components/camel-ldif/src/main/java/org/apache/camel/component/ldif/LdifComponent.java
@@ -21,11 +21,6 @@ import java.util.Map;
 import org.apache.camel.Endpoint;
 import org.apache.camel.impl.DefaultComponent;
 
-/**
- * Represents the component that manages {@link LdifEndpoint}(s).
- *
- * @version
- */
 public class LdifComponent extends DefaultComponent {
 
     @Override

http://git-wip-us.apache.org/repos/asf/camel/blob/2e11ef53/components/camel-ldif/src/main/java/org/apache/camel/component/ldif/LdifEndpoint.java
----------------------------------------------------------------------
diff --git 
a/components/camel-ldif/src/main/java/org/apache/camel/component/ldif/LdifEndpoint.java
 
b/components/camel-ldif/src/main/java/org/apache/camel/component/ldif/LdifEndpoint.java
index cde7712..2694932 100644
--- 
a/components/camel-ldif/src/main/java/org/apache/camel/component/ldif/LdifEndpoint.java
+++ 
b/components/camel-ldif/src/main/java/org/apache/camel/component/ldif/LdifEndpoint.java
@@ -21,17 +21,15 @@ import java.net.URISyntaxException;
 import org.apache.camel.Consumer;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
-import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.impl.DefaultEndpoint;
 import org.apache.camel.spi.Metadata;
 import org.apache.camel.spi.UriEndpoint;
 import org.apache.camel.spi.UriPath;
 
 /**
- * The ldif component allows you to process an LDIF body content on an LDAP
- * servers.
+ * The ldif component allows you to do updates on an LDAP server from a LDIF 
body content.
  */
-@UriEndpoint(firstVersion = "1.0.0", scheme = "ldif", title = "LDIF", syntax = 
"ldif:ldapConnectionName", producerOnly = true, label = "ldif")
+@UriEndpoint(firstVersion = "2.20.0", scheme = "ldif", title = "LDIF", syntax 
= "ldif:ldapConnectionName", producerOnly = true, label = "ldap")
 public class LdifEndpoint extends DefaultEndpoint {
     @UriPath
     @Metadata(required = "true")
@@ -44,7 +42,7 @@ public class LdifEndpoint extends DefaultEndpoint {
 
     @Override
     public Consumer createConsumer(Processor processor) throws Exception {
-        throw new RuntimeCamelException("An LDIF Consumer would be the LDAP 
server itself! No such support here");
+        throw new UnsupportedOperationException("An LDIF Consumer would be the 
LDAP server itself! No such support here");
     }
 
     @Override
@@ -65,8 +63,6 @@ public class LdifEndpoint extends DefaultEndpoint {
      * The name of the LdapConnection bean to pull from the registry. Note that
      * this must be of scope "prototype" to avoid it being shared among threads
      * or using a connection that has timed out.
-     *
-     * @param ldapConnectionName
      */
     public void setLdapConnectionName(String ldapConnectionName) {
         this.ldapConnectionName = ldapConnectionName;

http://git-wip-us.apache.org/repos/asf/camel/blob/2e11ef53/components/camel-ldif/src/main/java/org/apache/camel/component/ldif/LdifProducer.java
----------------------------------------------------------------------
diff --git 
a/components/camel-ldif/src/main/java/org/apache/camel/component/ldif/LdifProducer.java
 
b/components/camel-ldif/src/main/java/org/apache/camel/component/ldif/LdifProducer.java
index 5cef189..c718492 100644
--- 
a/components/camel-ldif/src/main/java/org/apache/camel/component/ldif/LdifProducer.java
+++ 
b/components/camel-ldif/src/main/java/org/apache/camel/component/ldif/LdifProducer.java
@@ -16,7 +16,6 @@
  */
 package org.apache.camel.component.ldif;
 
-import java.io.IOException;
 import java.io.InputStreamReader;
 import java.io.Reader;
 import java.io.StringReader;
@@ -29,6 +28,8 @@ import org.apache.camel.CamelException;
 import org.apache.camel.Exchange;
 import org.apache.camel.InvalidPayloadException;
 import org.apache.camel.impl.DefaultProducer;
+import org.apache.camel.util.IOHelper;
+import org.apache.camel.util.ObjectHelper;
 import org.apache.directory.api.ldap.model.exception.LdapException;
 import org.apache.directory.api.ldap.model.ldif.LdifEntry;
 import org.apache.directory.api.ldap.model.ldif.LdifReader;
@@ -36,12 +37,6 @@ import org.apache.directory.api.ldap.model.name.Dn;
 import org.apache.directory.api.ldap.model.name.Rdn;
 import org.apache.directory.ldap.client.api.LdapConnection;
 
-/**
- * LDIF Producer. This is the main processor that reads LDIF data/URLs and
- * executes them against an LdapConnection.
- *
- * @version $
- */
 public class LdifProducer extends DefaultProducer {
     // Constants
     private static final String LDIF_HEADER = "version: 1";
@@ -49,13 +44,8 @@ public class LdifProducer extends DefaultProducer {
     // properties
     private String ldapConnectionName;
 
-    /**
-     * @param endpoint
-     * @throws Exception
-     */
     public LdifProducer(LdifEndpoint endpoint, String ldapConnectionName) 
throws Exception {
         super(endpoint);
-
         this.ldapConnectionName = ldapConnectionName;
     }
 
@@ -66,8 +56,6 @@ public class LdifProducer extends DefaultProducer {
      * "version: 1".</li>
      * <li>A String body that is a URL to ready the LDIF content from</li>
      * </ol>
-     *
-     * @see org.apache.camel.impl.DefaultProducer#process(Exchange)
      */
     public void process(Exchange exchange) throws Exception {
         String body = exchange.getIn().getBody(String.class);
@@ -77,20 +65,16 @@ public class LdifProducer extends DefaultProducer {
         exchange.setOut(exchange.getIn());
 
         // If nothing to do, then return an empty body
-        if (null == body || "".equals(body)) {
+        if (ObjectHelper.isEmpty(body)) {
             exchange.getOut().setBody("");
         } else if (body.startsWith(LDIF_HEADER)) {
-            if (log.isDebugEnabled()) {
-                log.debug("reading from LDIF body");
-            }
+            log.debug("Reading from LDIF body");
             result = processLdif(new StringReader(body));
         } else {
-            URL loc = null;
+            URL loc;
             try {
                 loc = new URL(body);
-                if (log.isDebugEnabled()) {
-                    log.debug("reading from URL: " + loc);
-                }
+                log.debug("Reading from URL: {}", loc);
                 result = processLdif(new InputStreamReader(loc.openStream()));
             } catch (MalformedURLException e) {
                 if (log.isDebugEnabled()) {
@@ -117,13 +101,11 @@ public class LdifProducer extends DefaultProducer {
 
     /**
      * Process an LDIF file from a reader.
-     *
-     * @param ldifReader
-     * @return
      */
     private List<String> processLdif(Reader reader) throws CamelException {
         LdapConnection conn = getLdapConnection();
-        LdifReader ldifReader = null;
+        LdifReader ldifReader;
+
         List<String> results = new ArrayList<String>();
 
         // Create the reader
@@ -138,21 +120,7 @@ public class LdifProducer extends DefaultProducer {
             results.add(processLdifEntry(conn, e));
         }
 
-        // Cleanup
-        try {
-            conn.close();
-        } catch (IOException e) {
-            if (log.isDebugEnabled()) {
-                log.debug("failed to close the LDAP connection", e);
-            }
-        }
-        try {
-            ldifReader.close();
-        } catch (IOException e) {
-            if (log.isDebugEnabled()) {
-                log.debug("failed to close LDIF reader", e);
-            }
-        }
+        IOHelper.close(conn, ldifReader, reader);
 
         return results;
     }
@@ -160,8 +128,6 @@ public class LdifProducer extends DefaultProducer {
     /**
      * Figure out the change is and what to do about it.
      *
-     * @param conn
-     * @param ldifEntry
      * @return A success/failure message
      */
     private String processLdifEntry(LdapConnection conn, LdifEntry ldifEntry) {
@@ -193,23 +159,16 @@ public class LdifProducer extends DefaultProducer {
                 conn.rename(ldifEntry.getDn(), new Rdn(ldifEntry.getNewRdn()), 
ldifEntry.isDeleteOldRdn());
             }
 
-            if (log.isDebugEnabled()) {
-                log.debug("ldif success");
-            }
+            log.debug("ldif success");
             return "success";
         } catch (LdapException e) {
-            if (log.isDebugEnabled()) {
-                log.debug("failed to apply ldif", e);
-            }
+            log.debug("failed to apply ldif", e);
             return getRootCause(e);
         }
     }
 
     /**
      * Get the root cause of an exception
-     *
-     * @param e
-     * @return
      */
     private String getRootCause(LdapException e) {
         Throwable oldt;

http://git-wip-us.apache.org/repos/asf/camel/blob/2e11ef53/components/camel-ldif/src/test/resources/log4j2-test.xml
----------------------------------------------------------------------
diff --git a/components/camel-ldif/src/test/resources/log4j2-test.xml 
b/components/camel-ldif/src/test/resources/log4j2-test.xml
deleted file mode 100644
index 77e204a..0000000
--- a/components/camel-ldif/src/test/resources/log4j2-test.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-
-         http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-
--->
-<Configuration status="WARN">
-       <Appenders>
-               <Console name="stdout">
-                       <PatternLayout pattern="[%30.30t] %-30.30c{1} %-5p 
%m%n" />
-               </Console>
-               <File name="out" fileName="target/camel-ldif-test.log" 
bufferedIO="true" immediateFlush="true">
-                       <PatternLayout pattern="%d [%-15.15t] %-5p %-30.30c{1} 
- %m%n" />
-               </File>
-       </Appenders>
-       
-       <Loggers>
-               <Logger name="org.springframework" level="warn">
-               </Logger>
-               
-               <Logger name="org.apache.directory" level="warn">
-               </Logger>
-               
-               <Logger name="org.apache.camel.component.ldif" level="trace" 
additivity="false">
-                       <AppenderRef ref="out"/>
-               </Logger>
-               
-               <Root level="info">
-                       <AppenderRef ref="out" />
-                       <AppenderRef ref="stdout" />
-               </Root>
-       </Loggers>
-</Configuration>

http://git-wip-us.apache.org/repos/asf/camel/blob/2e11ef53/components/camel-ldif/src/test/resources/log4j2.properties
----------------------------------------------------------------------
diff --git a/components/camel-ldif/src/test/resources/log4j2.properties 
b/components/camel-ldif/src/test/resources/log4j2.properties
new file mode 100644
index 0000000..8186827
--- /dev/null
+++ b/components/camel-ldif/src/test/resources/log4j2.properties
@@ -0,0 +1,28 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+appender.file.type = File
+appender.file.name = file
+appender.file.fileName = target/camel-ldif-test.log
+appender.file.layout.type = PatternLayout
+appender.file.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
+appender.out.type = Console
+appender.out.name = out
+appender.out.layout.type = PatternLayout
+appender.out.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
+rootLogger.level = INFO
+rootLogger.appenderRef.file.ref = file

http://git-wip-us.apache.org/repos/asf/camel/blob/2e11ef53/platforms/spring-boot/components-starter/camel-ldif-starter/src/main/java/org/apache/camel/component/ldif/springboot/LdifComponentConfiguration.java
----------------------------------------------------------------------
diff --git 
a/platforms/spring-boot/components-starter/camel-ldif-starter/src/main/java/org/apache/camel/component/ldif/springboot/LdifComponentConfiguration.java
 
b/platforms/spring-boot/components-starter/camel-ldif-starter/src/main/java/org/apache/camel/component/ldif/springboot/LdifComponentConfiguration.java
index def3fb8..17a9f25 100644
--- 
a/platforms/spring-boot/components-starter/camel-ldif-starter/src/main/java/org/apache/camel/component/ldif/springboot/LdifComponentConfiguration.java
+++ 
b/platforms/spring-boot/components-starter/camel-ldif-starter/src/main/java/org/apache/camel/component/ldif/springboot/LdifComponentConfiguration.java
@@ -21,8 +21,8 @@ import 
org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
- * The ldif component allows you to process an LDIF body content on an LDAP
- * servers.
+ * The ldif component allows you to do updates on an LDAP server from a LDIF
+ * body content.
  * 
  * Generated by camel-package-maven-plugin - do not edit this file!
  */

Reply via email to