Skip to content

Commit

Permalink
expected resource not found: /META-INF/javamail.default.address.map #598
Browse files Browse the repository at this point in the history


Signed-off-by: Jorge Bescos Gascon <jorge.bescos.gascon@oracle.com>
  • Loading branch information
jbescos committed Apr 20, 2022
1 parent fedabff commit c54bdda
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions api/src/main/java/jakarta/mail/Session.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -261,10 +261,12 @@ private Session(Properties props, Authenticator authenticator) {

// get the Class associated with the Authenticator
Class<?> cl;
if (authenticator != null)
if (authenticator != null) {
cl = authenticator.getClass();
else
cl = this.getClass();
} else {
// Use implementation class, because that class loader has access to jakarta.mail module and implementation resources
cl = streamProvider.getClass();
}
// load the resources
loadProviders(cl);
loadAddressMap(cl);
Expand Down

0 comments on commit c54bdda

Please sign in to comment.