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


The following commit(s) were added to refs/heads/master by this push:
     new 6068f66  CAMEL-14284: Configuring endpoint should set properties on 
endpoint and not configuration object (PDF component) (#3511)
6068f66 is described below

commit 6068f66a1172c2a10bc80cc5c6d6620806f64be6
Author: Luca Burgazzoli <lburgazz...@users.noreply.github.com>
AuthorDate: Fri Jan 24 09:08:57 2020 +0100

    CAMEL-14284: Configuring endpoint should set properties on endpoint and not 
configuration object (PDF component) (#3511)
---
 .../java/org/apache/camel/component/pdf/PdfComponent.java   | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git 
a/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/PdfComponent.java
 
b/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/PdfComponent.java
index 40120b7..9a5b9e1 100644
--- 
a/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/PdfComponent.java
+++ 
b/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/PdfComponent.java
@@ -16,7 +16,6 @@
  */
 package org.apache.camel.component.pdf;
 
-import java.net.URI;
 import java.util.Map;
 
 import org.apache.camel.Endpoint;
@@ -31,9 +30,13 @@ public class PdfComponent extends DefaultComponent {
 
     @Override
     protected Endpoint createEndpoint(String uri, String remaining, 
Map<String, Object> parameters) throws Exception {
-        PdfConfiguration pdfConfiguration = new PdfConfiguration();
-        setProperties(pdfConfiguration, parameters);
-        pdfConfiguration.setOperation(new URI(uri).getHost());
-        return new PdfEndpoint(uri, this, pdfConfiguration);
+        PdfConfiguration configuration = new PdfConfiguration();
+        configuration.setOperation(remaining);
+
+        PdfEndpoint endpoint = new PdfEndpoint(uri, this, configuration);
+
+        setProperties(endpoint, parameters);
+
+        return endpoint;
     }
 }

Reply via email to