Skip to content

Commit 08cc103

Browse files
committed
Fix parameter name in outlook conversion methods ("msgData" -> "msgFileName")
1 parent 82fc87e commit 08cc103

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

modules/core-module/src/main/java/org/simplejavamail/internal/modules/OutlookModule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111

1212
public interface OutlookModule {
1313
EmailFromOutlookMessage outlookMsgToEmailBuilder(@NotNull File msgFile, @NotNull EmailStartingBuilder emailStartingBuilder, @NotNull EmailPopulatingBuilderFactory builderFactory, @NotNull InternalEmailConverter internalEmailConverter);
14-
EmailFromOutlookMessage outlookMsgToEmailBuilder(@NotNull String msgData, @NotNull EmailStartingBuilder emailStartingBuilder, @NotNull EmailPopulatingBuilderFactory builderFactory, @NotNull InternalEmailConverter internalEmailConverter);
14+
EmailFromOutlookMessage outlookMsgToEmailBuilder(@NotNull String msgFileName, @NotNull EmailStartingBuilder emailStartingBuilder, @NotNull EmailPopulatingBuilderFactory builderFactory, @NotNull InternalEmailConverter internalEmailConverter);
1515
EmailFromOutlookMessage outlookMsgToEmailBuilder(@NotNull InputStream msgInputStream, @NotNull EmailStartingBuilder emailStartingBuilder, @NotNull EmailPopulatingBuilderFactory builderFactory, @NotNull InternalEmailConverter internalEmailConverter);
1616
}

modules/outlook-module/src/main/java/org/simplejavamail/internal/outlooksupport/converter/OutlookEmailConverter.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ public EmailFromOutlookMessage outlookMsgToEmailBuilder(
5454

5555
@Override
5656
public EmailFromOutlookMessage outlookMsgToEmailBuilder(
57-
@NotNull final String msgFile,
57+
@NotNull final String msgFileName,
5858
@NotNull final EmailStartingBuilder emailStartingBuilder,
5959
@NotNull final EmailPopulatingBuilderFactory builderFactory,
6060
@NotNull final InternalEmailConverter internalEmailConverter) {
6161
return buildEmailFromOutlookMessage(
6262
emailStartingBuilder.ignoringDefaults().startingBlank(),
63-
parseOutlookMsg(checkNonEmptyArgument(msgFile, "msgFile")),
63+
parseOutlookMsg(checkNonEmptyArgument(msgFileName, "msgFile")),
6464
builderFactory,
6565
internalEmailConverter);
6666
}
@@ -186,9 +186,9 @@ private static OutlookMessage parseOutlookMsg(@NotNull final InputStream msgInpu
186186
}
187187

188188
@NotNull
189-
private static OutlookMessage parseOutlookMsg(@NotNull final String msgFile) {
189+
private static OutlookMessage parseOutlookMsg(@NotNull final String msgFileName) {
190190
try {
191-
return new org.simplejavamail.outlookmessageparser.OutlookMessageParser().parseMsg(msgFile);
191+
return new org.simplejavamail.outlookmessageparser.OutlookMessageParser().parseMsg(msgFileName);
192192
} catch (final IOException e) {
193193
throw new OutlookMessageException(OutlookMessageException.ERROR_PARSING_OUTLOOK_MSG, e);
194194
}

modules/simple-java-mail/src/main/java/org/simplejavamail/converter/EmailConverter.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,25 +128,25 @@ public static EmailPopulatingBuilder mimeMessageToEmailBuilder(@NotNull final Mi
128128
/**
129129
* Delegates to {@link #outlookMsgToEmail(String, Pkcs12Config)}.
130130
*
131-
* @param msgData The content of an Outlook (.msg) message from which to create the {@link Email}.
131+
* @param msgFileName The file name of an Outlook (.msg) message from which to create the {@link Email}.
132132
*/
133133
@SuppressWarnings("unused")
134134
@NotNull
135-
public static Email outlookMsgToEmail(@NotNull final String msgData) {
136-
return outlookMsgToEmail(msgData, null);
135+
public static Email outlookMsgToEmail(@NotNull final String msgFileName) {
136+
return outlookMsgToEmail(msgFileName, null);
137137
}
138138

139139
/**
140-
* @param msgData The content of an Outlook (.msg) message from which to create the {@link Email}.
140+
* @param msgFileName The file name of an Outlook (.msg) message from which to create the {@link Email}.
141141
* @param pkcs12Config Private key store for decrypting S/MIME encrypted attachments
142142
* (only needed when the message is encrypted rather than just signed).
143143
*/
144144
@SuppressWarnings("deprecation")
145145
@NotNull
146-
public static Email outlookMsgToEmail(@NotNull final String msgData, @Nullable final Pkcs12Config pkcs12Config) {
147-
checkNonEmptyArgument(msgData, "msgFile");
146+
public static Email outlookMsgToEmail(@NotNull final String msgFileName, @Nullable final Pkcs12Config pkcs12Config) {
147+
checkNonEmptyArgument(msgFileName, "msgFile");
148148
EmailFromOutlookMessage result = ModuleLoader.loadOutlookModule()
149-
.outlookMsgToEmailBuilder(msgData, new EmailStartingBuilderImpl(), new EmailPopulatingBuilderFactoryImpl(), InternalEmailConverterImpl.INSTANCE);
149+
.outlookMsgToEmailBuilder(msgFileName, new EmailStartingBuilderImpl(), new EmailPopulatingBuilderFactoryImpl(), InternalEmailConverterImpl.INSTANCE);
150150
return decryptAttachments(result.getEmailBuilder(), result.getOutlookMessage(), pkcs12Config)
151151
.buildEmail();
152152
}

0 commit comments

Comments
 (0)