This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-email.git


The following commit(s) were added to refs/heads/master by this push:
     new de925dc  Use preferred spelling for "cannot"
de925dc is described below

commit de925dc7aa5d8f4c3619c59380189ac41fcdd6bf
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Tue Nov 5 06:52:23 2024 -0500

    Use preferred spelling for "cannot"
---
 commons-email2-core/.gitignore                                    | 1 +
 commons-email2-jakarta/.gitignore                                 | 1 +
 .../src/main/java/org/apache/commons/mail2/jakarta/Email.java     | 8 ++++----
 .../src/main/java/org/apache/commons/mail2/jakarta/HtmlEmail.java | 2 +-
 .../apache/commons/mail2/jakarta/activation/PathDataSource.java   | 4 ++--
 commons-email2-javax/.gitignore                                   | 1 +
 .../src/main/java/org/apache/commons/mail2/javax/Email.java       | 8 ++++----
 .../src/main/java/org/apache/commons/mail2/javax/HtmlEmail.java   | 2 +-
 .../org/apache/commons/mail2/javax/activation/PathDataSource.java | 4 ++--
 9 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/commons-email2-core/.gitignore b/commons-email2-core/.gitignore
new file mode 100644
index 0000000..ae3c172
--- /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 0000000..ae3c172
--- /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 1a705b4..bf5819a 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 abstract class Email {
      */
     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 @@ public abstract class Email {
      */
     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 15d540d..b78c953 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 @@ public class HtmlEmail extends MultiPartEmail {
                     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 32b3eee..4a5ab95 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 final class PathDataSource implements DataSource {
     }
 
     /**
-     * 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 final class PathDataSource implements DataSource {
     }
 
     /**
-     * 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 0000000..ae3c172
--- /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 c19f4bc..b9d5d2f 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 abstract class Email {
      */
     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 @@ public abstract class Email {
      */
     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 578111d..4233c2a 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 @@ public class HtmlEmail extends MultiPartEmail {
                     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 6174b4b..8763251 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 final class PathDataSource implements DataSource {
     }
 
     /**
-     * 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 final class PathDataSource implements DataSource {
     }
 
     /**
-     * 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

Reply via email to