Skip to content

Commit

Permalink
MailHandler LogManger support for mail entries #119
Browse files Browse the repository at this point in the history
Signed-off-by: jmehrens <jason_mehrens@hotmail.com>
  • Loading branch information
jmehrens committed Jan 20, 2024
1 parent b3d36fa commit 77f699b
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1527,7 +1527,7 @@ public final Properties getMailProperties() {
* @since Angus Mail 2.0.3
*/
public final void setMailEntries(String entries) {
setMailProperties0(parseMailEntries(entries));
setMailProperties0(parseProperties(entries));
}

/**
Expand Down Expand Up @@ -2413,7 +2413,7 @@ private synchronized void init(final Properties props) {

//Verification of all of the MailHandler properties starts here
//That means setting new object members goes above this comment.
Properties entries = parseMailEntries(fromLogManager(p.concat(".mailEntries")));
Properties entries = parseProperties(fromLogManager(p.concat(".mailEntries")));
if (props == null && (entries.isEmpty() || !setMailProperties0(entries))
&& fromLogManager(p.concat(".verify")) != null) {
verifySettings(initSession());
Expand Down Expand Up @@ -2786,8 +2786,7 @@ private void initLevel(final String nameOrNumber) {
}

/**
* Parses the given properties lines then clears and sets all of the mail
* properties used for the session. Any parsing errors are reported to the
* Parses the given properties lines. Any parsing errors are reported to the
* error manager.
*
* @param entries one or more key/value pairs. An empty string, null value
Expand All @@ -2800,7 +2799,7 @@ private void initLevel(final String nameOrNumber) {
* @since Angus Mail 2.0.3
* @see #setMailEntries(java.lang.String)
*/
private Properties parseMailEntries(String entries) {
private Properties parseProperties(String entries) {
final Properties props = new Properties();
if (hasValue(entries)) {
/**
Expand Down

0 comments on commit 77f699b

Please sign in to comment.