| 1 | package fr.sii.ogham.spring.email; | |
| 2 | ||
| 3 | import java.nio.charset.Charset; | |
| 4 | ||
| 5 | import org.springframework.boot.context.properties.ConfigurationProperties; | |
| 6 | import org.springframework.boot.context.properties.NestedConfigurationProperty; | |
| 7 | ||
| 8 | @ConfigurationProperties("ogham.email.javamail") | |
| 9 | public class OghamJavaMailProperties { | |
| 10 | /** | |
| 11 | * The mail server address host (IP or hostname).<br /><br /> | |
| 12 | * | |
| 13 | * This value takes precedence over `spring.mail.host` and `mail.smtp.host` | |
| 14 | */ | |
| 15 | private String host; | |
| 16 | /** | |
| 17 | * The mail server port.<br /><br /> | |
| 18 | * | |
| 19 | * This value takes precedence over `spring.mail.port` and `mail.smtp.port` | |
| 20 | */ | |
| 21 | private Integer port; | |
| 22 | @NestedConfigurationProperty | |
| 23 | private AuthenticationProperties authenticator = new AuthenticationProperties(); | |
| 24 | @NestedConfigurationProperty | |
| 25 | private BodyProperties body = new BodyProperties(); | |
| 26 | ||
| 27 | public String getHost() { | |
| 28 |
2
1. getHost : replaced return value with "" for fr/sii/ogham/spring/email/OghamJavaMailProperties::getHost → KILLED 2. getHost : replaced return value with "" for fr/sii/ogham/spring/email/OghamJavaMailProperties::getHost → KILLED |
return host; |
| 29 | } | |
| 30 | ||
| 31 | public void setHost(String host) { | |
| 32 | this.host = host; | |
| 33 | } | |
| 34 | ||
| 35 | public Integer getPort() { | |
| 36 |
2
1. getPort : replaced Integer return value with 0 for fr/sii/ogham/spring/email/OghamJavaMailProperties::getPort → KILLED 2. getPort : replaced Integer return value with 0 for fr/sii/ogham/spring/email/OghamJavaMailProperties::getPort → KILLED |
return port; |
| 37 | } | |
| 38 | ||
| 39 | public void setPort(Integer port) { | |
| 40 | this.port = port; | |
| 41 | } | |
| 42 | ||
| 43 | public AuthenticationProperties getAuthenticator() { | |
| 44 |
2
1. getAuthenticator : replaced return value with null for fr/sii/ogham/spring/email/OghamJavaMailProperties::getAuthenticator → TIMED_OUT 2. getAuthenticator : replaced return value with null for fr/sii/ogham/spring/email/OghamJavaMailProperties::getAuthenticator → KILLED |
return authenticator; |
| 45 | } | |
| 46 | ||
| 47 | public void setAuthenticator(AuthenticationProperties authenticator) { | |
| 48 | this.authenticator = authenticator; | |
| 49 | } | |
| 50 | ||
| 51 | public BodyProperties getBody() { | |
| 52 |
2
1. getBody : replaced return value with null for fr/sii/ogham/spring/email/OghamJavaMailProperties::getBody → KILLED 2. getBody : replaced return value with null for fr/sii/ogham/spring/email/OghamJavaMailProperties::getBody → KILLED |
return body; |
| 53 | } | |
| 54 | ||
| 55 | public void setBody(BodyProperties body) { | |
| 56 | this.body = body; | |
| 57 | } | |
| 58 | ||
| 59 | public static class AuthenticationProperties { | |
| 60 | /** | |
| 61 | * SMTP server username | |
| 62 | */ | |
| 63 | private String username; | |
| 64 | /** | |
| 65 | * SMTP server password | |
| 66 | */ | |
| 67 | private String password; | |
| 68 | ||
| 69 | public String getUsername() { | |
| 70 |
2
1. getUsername : replaced return value with "" for fr/sii/ogham/spring/email/OghamJavaMailProperties$AuthenticationProperties::getUsername → SURVIVED 2. getUsername : replaced return value with "" for fr/sii/ogham/spring/email/OghamJavaMailProperties$AuthenticationProperties::getUsername → TIMED_OUT |
return username; |
| 71 | } | |
| 72 | ||
| 73 | public void setUsername(String username) { | |
| 74 | this.username = username; | |
| 75 | } | |
| 76 | ||
| 77 | public String getPassword() { | |
| 78 |
1
1. getPassword : replaced return value with "" for fr/sii/ogham/spring/email/OghamJavaMailProperties$AuthenticationProperties::getPassword → SURVIVED |
return password; |
| 79 | } | |
| 80 | ||
| 81 | public void setPassword(String password) { | |
| 82 | this.password = password; | |
| 83 | } | |
| 84 | } | |
| 85 | ||
| 86 | public static class BodyProperties { | |
| 87 | /** | |
| 88 | * Encoding for body. Default to UTF-8 | |
| 89 | */ | |
| 90 | private Charset charset; | |
| 91 | ||
| 92 | public Charset getCharset() { | |
| 93 |
1
1. getCharset : replaced return value with null for fr/sii/ogham/spring/email/OghamJavaMailProperties$BodyProperties::getCharset → SURVIVED |
return charset; |
| 94 | } | |
| 95 | ||
| 96 | public void setCharset(Charset charset) { | |
| 97 | this.charset = charset; | |
| 98 | } | |
| 99 | } | |
| 100 | } | |
Mutations | ||
| 28 |
1.1 2.2 |
|
| 36 |
1.1 2.2 |
|
| 44 |
1.1 2.2 |
|
| 52 |
1.1 2.2 |
|
| 70 |
1.1 2.2 |
|
| 78 |
1.1 |
|
| 93 |
1.1 |