Skip to content

Commit

Permalink
fix code formatting through the repo
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
  • Loading branch information
lukasj committed Apr 30, 2023
1 parent 2a37393 commit 222cc53
Show file tree
Hide file tree
Showing 128 changed files with 13,057 additions and 12,860 deletions.
10 changes: 5 additions & 5 deletions api/src/main/java/jakarta/mail/Address.java
@@ -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
@@ -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
@@ -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;
}
}
14 changes: 8 additions & 6 deletions api/src/main/java/jakarta/mail/BodyPart.java
@@ -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,7 +34,8 @@ public abstract class BodyPart implements Part {
/**
* The <code>Multipart</code> object containing this <code>BodyPart</code>,
* if known.
* @since JavaMail 1.1
*
* @since JavaMail 1.1
*/
protected Multipart parent;

Expand All @@ -55,10 +56,10 @@ public BodyPart() {
* Return the containing <code>Multipart</code> object,
* or <code>null</code> if not known.
*
* @return the parent Multipart
* @return the parent Multipart
*/
public Multipart getParent() {
return parent;
return parent;
}

/**
Expand All @@ -67,9 +68,10 @@ public Multipart getParent() {
* <code>addBodyPart</code> method. <code>parent</code> may be
* <code>null</code> if the <code>BodyPart</code> is being removed
* from its containing <code>Multipart</code>.
* @since JavaMail 1.1
*
* @since JavaMail 1.1
*/
void setParent(Multipart parent) {
this.parent = parent;
this.parent = parent;
}
}
22 changes: 11 additions & 11 deletions api/src/main/java/jakarta/mail/EncodingAware.java
Expand Up @@ -26,20 +26,20 @@
* could be created that forces all files to be base64 encoded:
* <blockquote><pre>
* public class Base64FileDataSource extends FileDataSource
* implements EncodingAware {
* public Base64FileDataSource(File file) {
* super(file);
* }
* implements EncodingAware {
* public Base64FileDataSource(File file) {
* super(file);
* }
*
* // implements EncodingAware.getEncoding()
* public String getEncoding() {
* return "base64";
* }
* // implements EncodingAware.getEncoding()
* public String getEncoding() {
* return "base64";
* }
* }
* </pre></blockquote>
*
* @since JavaMail 1.5
* @author Bill Shannon
* @author Bill Shannon
* @since JavaMail 1.5
*/

public interface EncodingAware {
Expand All @@ -49,7 +49,7 @@ public interface EncodingAware {
* or null to indicate that an appropriate value should be chosen
* by the caller.
*
* @return the Content-Transfer-Encoding value, or null
* @return the Content-Transfer-Encoding value, or null
*/
public String getEncoding();
}

0 comments on commit 222cc53

Please sign in to comment.