[camel] branch master updated: CAMEL-14565: Add docs for missing option

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[camel] branch master updated: CAMEL-14565: Add docs for missing option

davsclaus-2
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 1b68ff1  CAMEL-14565: Add docs for missing option
1b68ff1 is described below

commit 1b68ff1008a0b63aa3a1d41ae2da62f7bfd23181
Author: Claus Ibsen <[hidden email]>
AuthorDate: Sat Feb 15 14:32:30 2020 +0100

    CAMEL-14565: Add docs for missing option
---
 .../java/org/apache/camel/component/mail/MailConfiguration.java    | 7 ++++---
 .../java/org/apache/camel/component/mail/MailEndpointTest.java     | 6 +++---
 .../java/org/apache/camel/component/mail/MailEndpointTlsTest.java  | 6 +++---
 .../org/apache/camel/component/mail/MailUsingOwnComponentTest.java | 2 +-
 4 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java b/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java
index f82864d..7637168 100644
--- a/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java
+++ b/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java
@@ -44,7 +44,8 @@ public class MailConfiguration implements Cloneable {
     private transient Map<Message.RecipientType, String> recipients = new HashMap<>();
 
     // protocol is implied by component name so it should not be in UriPath
-    private String protocol;
+    private transient String protocol;
+
     @UriPath @Metadata(required = true)
     private String host;
     @UriPath
@@ -147,7 +148,7 @@ public class MailConfiguration implements Cloneable {
         if (!isIgnoreUriScheme()) {
             String scheme = uri.getScheme();
             if (scheme != null) {
-                setProtocol(scheme);
+                configureProtocol(scheme);
             }
         }
 
@@ -392,7 +393,7 @@ public class MailConfiguration implements Cloneable {
     /**
      * The protocol for communicating with the mail server
      */
-    public void setProtocol(String protocol) {
+    public void configureProtocol(String protocol) {
         this.protocol = protocol;
     }
 
diff --git a/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailEndpointTest.java b/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailEndpointTest.java
index 4b8beca..d721e3f 100644
--- a/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailEndpointTest.java
+++ b/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailEndpointTest.java
@@ -31,7 +31,7 @@ public class MailEndpointTest extends CamelTestSupport {
 
         MailConfiguration cfg = new MailConfiguration();
         cfg.setPort(21);
-        cfg.setProtocol("smtp");
+        cfg.configureProtocol("smtp");
         cfg.setHost("myhost");
         cfg.setUsername("james");
         cfg.setPassword("secret");
@@ -50,7 +50,7 @@ public class MailEndpointTest extends CamelTestSupport {
 
         MailConfiguration cfg = new MailConfiguration();
         cfg.setPort(21);
-        cfg.setProtocol("smtp");
+        cfg.configureProtocol("smtp");
         cfg.setHost("myhost");
         cfg.setUsername("james");
         cfg.setPassword("secret");
@@ -63,7 +63,7 @@ public class MailEndpointTest extends CamelTestSupport {
     public void testMailEndpointCtrEndpointConfig() throws Exception {
         MailConfiguration cfg = new MailConfiguration();
         cfg.setPort(21);
-        cfg.setProtocol("smtp");
+        cfg.configureProtocol("smtp");
         cfg.setHost("myhost");
         cfg.setUsername("james");
         cfg.setPassword("secret");
diff --git a/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailEndpointTlsTest.java b/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailEndpointTlsTest.java
index 25cee00..d54839b 100644
--- a/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailEndpointTlsTest.java
+++ b/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailEndpointTlsTest.java
@@ -53,7 +53,7 @@ public class MailEndpointTlsTest extends CamelTestSupport {
 
         MailConfiguration cfg = new MailConfiguration();
         cfg.setPort(21);
-        cfg.setProtocol(protocol);
+        cfg.configureProtocol(protocol);
         cfg.setHost("myhost");
         cfg.setUsername("james");
         cfg.setPassword("secret");
@@ -70,7 +70,7 @@ public class MailEndpointTlsTest extends CamelTestSupport {
     public void testMailEndpointNoTlsConfig() throws Exception {
         MailConfiguration cfg = new MailConfiguration();
         cfg.setPort(21);
-        cfg.setProtocol(protocol);
+        cfg.configureProtocol(protocol);
         cfg.setHost("myhost");
         cfg.setUsername("james");
         cfg.setPassword("secret");
@@ -100,7 +100,7 @@ public class MailEndpointTlsTest extends CamelTestSupport {
 
         MailConfiguration cfg = new MailConfiguration();
         cfg.setPort(21);
-        cfg.setProtocol(protocol);
+        cfg.configureProtocol(protocol);
         cfg.setHost("myhost");
         cfg.setUsername("james");
         cfg.setPassword("secret");
diff --git a/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailUsingOwnComponentTest.java b/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailUsingOwnComponentTest.java
index a4e4bbf..b82a1d3 100644
--- a/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailUsingOwnComponentTest.java
+++ b/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailUsingOwnComponentTest.java
@@ -33,7 +33,7 @@ public class MailUsingOwnComponentTest extends CamelTestSupport {
         CamelContext context = super.createCamelContext();
 
         MailConfiguration config = new MailConfiguration();
-        config.setProtocol("smtp");
+        config.configureProtocol("smtp");
         config.setUsername("james");
         config.setHost("localhost");
         config.setPort(25);