diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 4c50bd36..7932af22 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -1,5 +1,5 @@ # -# Copyright (c) 2021 Contributors to the Eclipse Foundation +# Copyright (c) 2021, 2022 Contributors to the Eclipse Foundation # # This program and the accompanying materials are made available under the # terms of the Eclipse Public License v. 2.0 which is available at @@ -42,4 +42,4 @@ jobs: - name: Verify run: | cd api - mvn -B -U -C -V clean verify org.glassfish.copyright:glassfish-copyright-maven-plugin:check -Poss-release,staging -Dgpg.skip=true + mvn -B -U -C -V clean verify org.glassfish.copyright:glassfish-copyright-maven-plugin:check -Poss-release,staging -Dcopyright.ignoreyear=true -Dgpg.skip=true diff --git a/api/src/main/java/jakarta/mail/Session.java b/api/src/main/java/jakarta/mail/Session.java index 5fe4d54b..e76b7acb 100644 --- a/api/src/main/java/jakarta/mail/Session.java +++ b/api/src/main/java/jakarta/mail/Session.java @@ -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 @@ -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);