Skip to content

Commit

Permalink
Use preferred spelling for "cannot"
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Nov 5, 2024
1 parent a54049d commit de925dc
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 14 deletions.
1 change: 1 addition & 0 deletions commons-email2-core/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/bin/
1 change: 1 addition & 0 deletions commons-email2-jakarta/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/bin/
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions commons-email2-javax/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/bin/
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit de925dc

Please sign in to comment.