Skip to content

Commit b787cb5

Browse files
committed
Fixed naming of withCustomSSLFactory -> withCustomSSLFactoryClass
1 parent afbc9d0 commit b787cb5

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

modules/core-module/src/main/java/org/simplejavamail/api/mailer/MailerRegularBuilder.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public interface MailerRegularBuilder<T extends MailerRegularBuilder<?>> extends
112112
* @see <a href="https://javaee.github.io/javamail/docs/api/com/sun/mail/smtp/package-summary.html">Java / Jakarta Mail properties</a>
113113
* @see #withCustomSSLFactoryInstance(SSLSocketFactory)
114114
*/
115-
T withCustomSSLFactory(@Nullable String factoryClass);
115+
T withCustomSSLFactoryClass(@Nullable String factoryClass);
116116

117117
/**
118118
* Configures the session with the right property to use your own factory for obtaining SSL connections.
@@ -126,7 +126,7 @@ public interface MailerRegularBuilder<T extends MailerRegularBuilder<?>> extends
126126
* @param sslSocketFactoryInstance An instance of the {@link SSLSocketFactory} class.
127127
*
128128
* @see <a href="https://javaee.github.io/javamail/docs/api/com/sun/mail/smtp/package-summary.html">Java / Jakarta Mail properties</a>
129-
* @see #withCustomSSLFactory(String)
129+
* @see #withCustomSSLFactoryClass(String)
130130
*/
131131
@Cli.ExcludeApi(reason = "This API is specifically for Java use")
132132
T withCustomSSLFactoryInstance(@Nullable SSLSocketFactory sslSocketFactoryInstance);
@@ -170,7 +170,7 @@ public interface MailerRegularBuilder<T extends MailerRegularBuilder<?>> extends
170170
TransportStrategy getTransportStrategy();
171171

172172
/**
173-
* @see #withCustomSSLFactory(String)
173+
* @see #withCustomSSLFactoryClass(String)
174174
*/
175175
@Nullable
176176
String getCustomSSLFactory();

modules/simple-java-mail/src/main/java/org/simplejavamail/mailer/internal/MailerRegularBuilderImpl.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public class MailerRegularBuilderImpl extends MailerGenericBuilderImpl<MailerReg
5353
private TransportStrategy transportStrategy;
5454

5555
/**
56-
* @see #withCustomSSLFactory(String)
56+
* @see #withCustomSSLFactoryClass(String)
5757
*/
5858
private String customSSLFactory;
5959

@@ -89,7 +89,7 @@ public MailerRegularBuilderImpl() {
8989
withTransportStrategy(assumeNonNull(ConfigLoader.<TransportStrategy>getProperty(TRANSPORT_STRATEGY)));
9090
}
9191
if (hasProperty(CUSTOM_SSLFACTORY_CLASS)) {
92-
withCustomSSLFactory(assumeNonNull(ConfigLoader.getStringProperty(CUSTOM_SSLFACTORY_CLASS)));
92+
withCustomSSLFactoryClass(assumeNonNull(ConfigLoader.getStringProperty(CUSTOM_SSLFACTORY_CLASS)));
9393
}
9494
}
9595

@@ -169,10 +169,10 @@ public MailerRegularBuilderImpl withSMTPServerPassword(@Nullable final String pa
169169
}
170170

171171
/**
172-
* @see MailerRegularBuilder#withCustomSSLFactory(String)
172+
* @see MailerRegularBuilder#withCustomSSLFactoryClass(String)
173173
*/
174174
@Override
175-
public MailerRegularBuilderImpl withCustomSSLFactory(@Nullable final String customSSLFactory) {
175+
public MailerRegularBuilderImpl withCustomSSLFactoryClass(@Nullable final String customSSLFactory) {
176176
this.customSSLFactory = customSSLFactory;
177177
return this;
178178
}

modules/simple-java-mail/src/test/java/org/simplejavamail/mailer/MailerTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import java.io.ByteArrayInputStream;
2525
import java.io.File;
2626
import java.io.IOException;
27-
import java.util.AbstractMap;
2827
import java.util.AbstractMap.SimpleEntry;
2928
import java.util.GregorianCalendar;
3029
import java.util.Properties;
@@ -290,7 +289,7 @@ public void testDKIMPriming()
290289
public void testSSLSocketFactoryClassConfig() {
291290
final Mailer mailer = MailerBuilder
292291
.withSMTPServer("host", 25, null, null)
293-
.withCustomSSLFactory("teh_class")
292+
.withCustomSSLFactoryClass("teh_class")
294293
.buildMailer();
295294

296295
final Session session = mailer.getSession();
@@ -321,7 +320,7 @@ public void testSSLSocketFactoryCombinedConfig() {
321320
final Mailer mailer = MailerBuilder
322321
.withSMTPServer("host", 25, null, null)
323322
.withCustomSSLFactoryInstance(mockFactory)
324-
.withCustomSSLFactory("teh_class")
323+
.withCustomSSLFactoryClass("teh_class")
325324
.buildMailer();
326325

327326
final Session session = mailer.getSession();

0 commit comments

Comments
 (0)