diff --git a/commons-email2-core/.gitignore b/commons-email2-core/.gitignore new file mode 100644 index 000000000..ae3c17260 --- /dev/null +++ b/commons-email2-core/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/commons-email2-jakarta/.gitignore b/commons-email2-jakarta/.gitignore new file mode 100644 index 000000000..ae3c17260 --- /dev/null +++ b/commons-email2-jakarta/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/commons-email2-jakarta/src/main/java/org/apache/commons/mail2/jakarta/Email.java b/commons-email2-jakarta/src/main/java/org/apache/commons/mail2/jakarta/Email.java index 1a705b452..bf5819aa0 100644 --- a/commons-email2-jakarta/src/main/java/org/apache/commons/mail2/jakarta/Email.java +++ b/commons-email2-jakarta/src/main/java/org/apache/commons/mail2/jakarta/Email.java @@ -378,10 +378,10 @@ public Email addCc(final String email, final String name, final String charset) */ public void addHeader(final String name, final String value) { if (EmailUtils.isEmpty(name)) { - throw new IllegalArgumentException("name can not be null or empty"); + throw new IllegalArgumentException("name cannot be null or empty"); } if (EmailUtils.isEmpty(value)) { - throw new IllegalArgumentException("value can not be null or empty"); + throw new IllegalArgumentException("value cannot be null or empty"); } headers.put(name, value); } @@ -607,10 +607,10 @@ private void checkSessionAlreadyInitialized() { */ private String createFoldedHeaderValue(final String name, final String value) { if (EmailUtils.isEmpty(name)) { - throw new IllegalArgumentException("name can not be null or empty"); + throw new IllegalArgumentException("name cannot be null or empty"); } if (EmailUtils.isEmpty(value)) { - throw new IllegalArgumentException("value can not be null or empty"); + throw new IllegalArgumentException("value cannot be null or empty"); } try { return MimeUtility.fold(name.length() + 2, MimeUtility.encodeText(value, charset, null)); diff --git a/commons-email2-jakarta/src/main/java/org/apache/commons/mail2/jakarta/HtmlEmail.java b/commons-email2-jakarta/src/main/java/org/apache/commons/mail2/jakarta/HtmlEmail.java index 15d540da3..b78c95381 100644 --- a/commons-email2-jakarta/src/main/java/org/apache/commons/mail2/jakarta/HtmlEmail.java +++ b/commons-email2-jakarta/src/main/java/org/apache/commons/mail2/jakarta/HtmlEmail.java @@ -253,7 +253,7 @@ private void build() throws MessagingException, EmailException { msgHtml.setContent(html, EmailConstants.TEXT_HTML + "; charset=" + getCharsetName()); } else { // unfortunately, MimeUtility.getDefaultMIMECharset() is package private - // and thus can not be used to set the default system charset in case + // and thus cannot be used to set the default system charset in case // no charset has been provided by the user msgHtml.setContent(html, EmailConstants.TEXT_HTML); } diff --git a/commons-email2-jakarta/src/main/java/org/apache/commons/mail2/jakarta/activation/PathDataSource.java b/commons-email2-jakarta/src/main/java/org/apache/commons/mail2/jakarta/activation/PathDataSource.java index 32b3eee34..4a5ab955e 100644 --- a/commons-email2-jakarta/src/main/java/org/apache/commons/mail2/jakarta/activation/PathDataSource.java +++ b/commons-email2-jakarta/src/main/java/org/apache/commons/mail2/jakarta/activation/PathDataSource.java @@ -101,7 +101,7 @@ public String getContentType() { } /** - * Gets an InputStream representing the the data and will throw an IOException if it can not do so. This method will return a new instance of InputStream + * Gets an InputStream representing the the data and will throw an IOException if it cannot do so. This method will return a new instance of InputStream * with each invocation. * * @return an InputStream @@ -123,7 +123,7 @@ public String getName() { } /** - * Gets an OutputStream representing the the data and will throw an IOException if it can not do so. This method will return a new instance of OutputStream + * Gets an OutputStream representing the the data and will throw an IOException if it cannot do so. This method will return a new instance of OutputStream * with each invocation. * * @return an OutputStream diff --git a/commons-email2-javax/.gitignore b/commons-email2-javax/.gitignore new file mode 100644 index 000000000..ae3c17260 --- /dev/null +++ b/commons-email2-javax/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/commons-email2-javax/src/main/java/org/apache/commons/mail2/javax/Email.java b/commons-email2-javax/src/main/java/org/apache/commons/mail2/javax/Email.java index c19f4bc71..b9d5d2f8d 100644 --- a/commons-email2-javax/src/main/java/org/apache/commons/mail2/javax/Email.java +++ b/commons-email2-javax/src/main/java/org/apache/commons/mail2/javax/Email.java @@ -377,10 +377,10 @@ public Email addCc(final String email, final String name, final String charset) */ public void addHeader(final String name, final String value) { if (EmailUtils.isEmpty(name)) { - throw new IllegalArgumentException("name can not be null or empty"); + throw new IllegalArgumentException("name cannot be null or empty"); } if (EmailUtils.isEmpty(value)) { - throw new IllegalArgumentException("value can not be null or empty"); + throw new IllegalArgumentException("value cannot be null or empty"); } headers.put(name, value); } @@ -606,10 +606,10 @@ private void checkSessionAlreadyInitialized() { */ private String createFoldedHeaderValue(final String name, final String value) { if (EmailUtils.isEmpty(name)) { - throw new IllegalArgumentException("name can not be null or empty"); + throw new IllegalArgumentException("name cannot be null or empty"); } if (EmailUtils.isEmpty(value)) { - throw new IllegalArgumentException("value can not be null or empty"); + throw new IllegalArgumentException("value cannot be null or empty"); } try { return MimeUtility.fold(name.length() + 2, MimeUtility.encodeText(value, charset, null)); diff --git a/commons-email2-javax/src/main/java/org/apache/commons/mail2/javax/HtmlEmail.java b/commons-email2-javax/src/main/java/org/apache/commons/mail2/javax/HtmlEmail.java index 578111d71..4233c2a21 100644 --- a/commons-email2-javax/src/main/java/org/apache/commons/mail2/javax/HtmlEmail.java +++ b/commons-email2-javax/src/main/java/org/apache/commons/mail2/javax/HtmlEmail.java @@ -253,7 +253,7 @@ private void build() throws MessagingException, EmailException { msgHtml.setContent(html, EmailConstants.TEXT_HTML + "; charset=" + getCharsetName()); } else { // unfortunately, MimeUtility.getDefaultMIMECharset() is package private - // and thus can not be used to set the default system charset in case + // and thus cannot be used to set the default system charset in case // no charset has been provided by the user msgHtml.setContent(html, EmailConstants.TEXT_HTML); } diff --git a/commons-email2-javax/src/main/java/org/apache/commons/mail2/javax/activation/PathDataSource.java b/commons-email2-javax/src/main/java/org/apache/commons/mail2/javax/activation/PathDataSource.java index 6174b4bcd..87632517f 100644 --- a/commons-email2-javax/src/main/java/org/apache/commons/mail2/javax/activation/PathDataSource.java +++ b/commons-email2-javax/src/main/java/org/apache/commons/mail2/javax/activation/PathDataSource.java @@ -101,7 +101,7 @@ public String getContentType() { } /** - * Gets an InputStream representing the the data and will throw an IOException if it can not do so. This method will return a new instance of InputStream + * Gets an InputStream representing the the data and will throw an IOException if it cannot do so. This method will return a new instance of InputStream * with each invocation. * * @return an InputStream @@ -123,7 +123,7 @@ public String getName() { } /** - * Gets an OutputStream representing the the data and will throw an IOException if it can not do so. This method will return a new instance of OutputStream + * Gets an OutputStream representing the the data and will throw an IOException if it cannot do so. This method will return a new instance of OutputStream * with each invocation. * * @return an OutputStream