Skip to content

Commit

Permalink
Update MessagingException
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Bescos Gascon <[email protected]>
  • Loading branch information
jbescos committed Mar 8, 2024
1 parent d389798 commit 7849e77
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion api/src/main/java/jakarta/mail/BodyPart.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ void setParent(Multipart parent) {
}

@Override
public StreamProvider getStreamProvider() throws NoSuchProviderException {
public StreamProvider getStreamProvider() throws MessagingException {
if (parent != null) {
return parent.getStreamProvider();
} else {
Expand Down
2 changes: 1 addition & 1 deletion api/src/main/java/jakarta/mail/Message.java
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ public boolean match(SearchTerm term) throws MessagingException {
}

@Override
public StreamProvider getStreamProvider() throws NoSuchProviderException {
public StreamProvider getStreamProvider() throws MessagingException {
try {
try {
final Session s = this.session;
Expand Down
4 changes: 2 additions & 2 deletions api/src/main/java/jakarta/mail/Multipart.java
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,11 @@ public synchronized void setParent(Part parent) {
* {@link Session#getDefaultInstance(java.util.Properties, Authenticator)}.
*
* @return the StreamProvider implementation from the session.
* @throws NoSuchProviderException if errors.
* @throws MessagingException if errors.
*
* @since JavaMail 2.2
*/
protected StreamProvider getStreamProvider() throws NoSuchProviderException {
protected StreamProvider getStreamProvider() throws MessagingException {
Part parent = this.parent;
if (parent != null) {
return parent.getStreamProvider();
Expand Down
4 changes: 2 additions & 2 deletions api/src/main/java/jakarta/mail/Part.java
Original file line number Diff line number Diff line change
Expand Up @@ -461,11 +461,11 @@ Enumeration<Header> getNonMatchingHeaders(String[] header_names)
* It defaults to {@link Session#getDefaultInstance(java.util.Properties, Authenticator)}.
*
* @return the StreamProvider.
* @throws NoSuchProviderException if errors.
* @throws MessagingException if errors.
*
* @since JavaMail 2.2
*/
default StreamProvider getStreamProvider() throws NoSuchProviderException {
default StreamProvider getStreamProvider() throws MessagingException {
try {
try {
return Session.getDefaultInstance(System.getProperties(), null).getStreamProvider();
Expand Down

0 comments on commit 7849e77

Please sign in to comment.