Skip to content

Commit

Permalink
Merge master
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Bescos Gascon <[email protected]>
  • Loading branch information
jbescos committed Feb 28, 2024
2 parents b2f4e98 + aa1dc71 commit 5a4c97b
Show file tree
Hide file tree
Showing 138 changed files with 13,580 additions and 13,106 deletions.
4 changes: 4 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#fix code formatting through the repo
222cc53870609d4acff46b5a49365f62f8912479
#remove redundant modifiers, use java-style arrays
695a6998ddcbe94866b04f63f03152c6005b8f93
15 changes: 5 additions & 10 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2021, 2022 Contributors to the Eclipse Foundation
# Copyright (c) 2021, 2024 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
Expand Down Expand Up @@ -29,22 +29,17 @@ jobs:

strategy:
matrix:
java_version: [ 11, 17 ]
java_version: [ 11, 17, 21 ]

steps:
- name: Checkout for build
uses: actions/checkout@v2.3.4
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: ${{ matrix.java_version }}
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
cache: 'maven'
- name: Verify
run: |
cd api
Expand Down
34 changes: 18 additions & 16 deletions api/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 1997, 2024 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 All @@ -23,14 +23,14 @@
<parent>
<groupId>org.eclipse.ee4j</groupId>
<artifactId>project</artifactId>
<version>1.0.7</version>
<version>1.0.9</version>
<relativePath/>
</parent>

<modelVersion>4.0.0</modelVersion>
<groupId>jakarta.mail</groupId>
<artifactId>jakarta.mail-api</artifactId>
<version>2.1.2-SNAPSHOT</version>
<version>2.1.3-SNAPSHOT</version>
<name>Jakarta Mail API</name>
<description>${project.name} ${spec.version} Specification API</description>

Expand Down Expand Up @@ -66,6 +66,7 @@
<properties>
<spec.version>2.1</spec.version>
<spec.title>Jakarta Mail Specification</spec.title>
<project.build.outputTimestamp>2024-02-14T00:00:00Z</project.build.outputTimestamp>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<javadoc.title>Jakarta Mail API documentation</javadoc.title>
<legal.doc.source>${project.basedir}/..</legal.doc.source>
Expand All @@ -78,7 +79,7 @@
<spotbugs.threshold>Low</spotbugs.threshold>
<spotbugs.exclude>${project.basedir}/../spotbugs-exclude.xml</spotbugs.exclude>
<!--Maven plugins version-->
<spotbugs.version>4.7.3.0</spotbugs.version>
<spotbugs.version>4.8.3.1</spotbugs.version>

<!-- version identifier in jakarta.mail.Version -->
<mail.version>${project.version}</mail.version>
Expand All @@ -89,12 +90,12 @@
<dependency>
<groupId>jakarta.activation</groupId>
<artifactId>jakarta.activation-api</artifactId>
<version>2.1.1</version>
<version>2.1.3</version>
</dependency>
<dependency>
<groupId>org.eclipse.angus</groupId>
<artifactId>angus-activation</artifactId>
<version>1.1.0</version>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down Expand Up @@ -127,17 +128,17 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.0</version>
<version>3.3.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<version>3.12.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M7</version>
<version>3.2.5</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -147,7 +148,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.3.0</version>
<version>3.4.0</version>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
Expand All @@ -163,7 +164,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.1.0</version>
<version>3.4.1</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
Expand All @@ -173,7 +174,7 @@
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>5.1.8</version>
<version>5.1.9</version>
<configuration>
<instructions>
<_noextraheaders>true</_noextraheaders>
Expand All @@ -188,12 +189,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.4.1</version>
<version>3.6.3</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.4.1</version>
<version>3.5.0</version>
</plugin>
<plugin>
<groupId>org.glassfish.copyright</groupId>
Expand Down Expand Up @@ -323,11 +324,11 @@
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>9</release>
<createMissingPackageInfoClass>false</createMissingPackageInfoClass>
<compilerArgs>
<arg>-Xlint:all</arg>
</compilerArgs>
<showWarnings>true</showWarnings>
<showWarnings>true</showWarnings>
</configuration>
<executions>
<execution>
Expand Down Expand Up @@ -363,6 +364,7 @@
<Implementation-Title>${project.name}</Implementation-Title>
<Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
<Implementation-Build-Id>${buildNumber}</Implementation-Build-Id>
<DynamicImport-Package>org.glassfish.hk2.osgiresourcelocator</DynamicImport-Package>
<Import-Package>
!org.glassfish.hk2.osgiresourcelocator,
*
Expand Down Expand Up @@ -468,7 +470,7 @@ Use is subject to <a href="{@docRoot}/doc-files/speclicense.html" target="_top">
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.8</version>
<version>0.8.11</version>
</plugin>
</plugins>
</pluginManagement>
Expand Down
10 changes: 5 additions & 5 deletions api/src/main/java/jakarta/mail/Address.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, 2023 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 @@ -42,15 +42,15 @@ public Address() {
/**
* Return a type string that identifies this address type.
*
* @return address type
* @see jakarta.mail.internet.InternetAddress
* @return address type
* @see jakarta.mail.internet.InternetAddress
*/
public abstract String getType();

/**
* Return a String representation of this address object.
*
* @return string representation of this address
* @return string representation of this address
*/
@Override
public abstract String toString();
Expand All @@ -65,7 +65,7 @@ public Address() {
* <code>equals</code> and <code>hashCode</code> - objects that
* compare as equal must have the same hashCode.
*
* @param address Address object
* @param address Address object
*/
@Override
public abstract boolean equals(Object address);
Expand Down
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, 2023 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 @@ -32,29 +32,29 @@ public class AuthenticationFailedException extends MessagingException {
* Constructs an AuthenticationFailedException.
*/
public AuthenticationFailedException() {
super();
super();
}

/**
* Constructs an AuthenticationFailedException with the specified
* detail message.
*
* @param message The detailed error message
* @param message The detailed error message
*/
public AuthenticationFailedException(String message) {
super(message);
super(message);
}

/**
* Constructs an AuthenticationFailedException with the specified
* detail message and embedded exception. The exception is chained
* to this exception.
*
* @param message The detailed error message
* @param e The embedded exception
* @since JavaMail 1.5
* @param message The detailed error message
* @param e The embedded exception
* @since JavaMail 1.5
*/
public AuthenticationFailedException(String message, Exception e) {
super(message, e);
super(message, e);
}
}
56 changes: 27 additions & 29 deletions api/src/main/java/jakarta/mail/Authenticator.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, 2023 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 @@ -34,16 +34,15 @@
* All methods that request authentication have a default implementation
* that fails.
*
* @author Bill Foote
* @author Bill Shannon
* @see java.net.Authenticator
* @see jakarta.mail.Session#getInstance(java.util.Properties,
* jakarta.mail.Authenticator)
* jakarta.mail.Authenticator)
* @see jakarta.mail.Session#getDefaultInstance(java.util.Properties,
* jakarta.mail.Authenticator)
* jakarta.mail.Authenticator)
* @see jakarta.mail.Session#requestPasswordAuthentication
* @see jakarta.mail.PasswordAuthentication
*
* @author Bill Foote
* @author Bill Shannon
*/
public abstract class Authenticator {

Expand All @@ -66,65 +65,63 @@ public Authenticator() {
* Ask the authenticator for a password.
* <p>
*
* @param addr The InetAddress of the site requesting authorization,
* or null if not known.
* @param port the port for the requested connection
* @param addr The InetAddress of the site requesting authorization,
* or null if not known.
* @param port the port for the requested connection
* @param protocol The protocol that's requesting the connection
* (@see java.net.Authenticator.getProtocol())
* @param prompt A prompt string for the user
*
* (@see java.net.Authenticator.getProtocol())
* @param prompt A prompt string for the user
* @return The username/password, or null if one can't be gotten.
*/
final synchronized PasswordAuthentication requestPasswordAuthentication(
InetAddress addr, int port, String protocol,
String prompt, String defaultUserName) {
requestingSite = addr;
requestingPort = port;
requestingProtocol = protocol;
requestingPrompt = prompt;
requestingUserName = defaultUserName;
return getPasswordAuthentication();
InetAddress addr, int port, String protocol,
String prompt, String defaultUserName) {
requestingSite = addr;
requestingPort = port;
requestingProtocol = protocol;
requestingPrompt = prompt;
requestingUserName = defaultUserName;
return getPasswordAuthentication();
}

/**
* @return the InetAddress of the site requesting authorization, or null
* if it's not available.
* if it's not available.
*/
protected final InetAddress getRequestingSite() {
return requestingSite;
return requestingSite;
}

/**
* @return the port for the requested connection
*/
protected final int getRequestingPort() {
return requestingPort;
return requestingPort;
}

/**
* Give the protocol that's requesting the connection. Often this
* will be based on a URLName.
*
* @return the protcol
*
* @see jakarta.mail.URLName#getProtocol
*/
protected final String getRequestingProtocol() {
return requestingProtocol;
return requestingProtocol;
}

/**
* @return the prompt string given by the requestor
*/
protected final String getRequestingPrompt() {
return requestingPrompt;
return requestingPrompt;
}

/**
* @return the default user name given by the requestor
*/
protected final String getDefaultUserName() {
return requestingUserName;
return requestingUserName;
}

/**
Expand All @@ -135,10 +132,11 @@ protected final String getDefaultUserName() {
* information, the dialog needs to block until the user supplies the
* information. This method can not simply return after showing the
* dialog.
*
* @return The PasswordAuthentication collected from the
* user, or null if none is provided.
* user, or null if none is provided.
*/
protected PasswordAuthentication getPasswordAuthentication() {
return null;
return null;
}
}
Loading

0 comments on commit 5a4c97b

Please sign in to comment.