Jetty 12 - Javadoc cleanup & new inspection profile (#9165)

* Adding intellij-javadoc-inspection.xml for Jetty specific Javadoc inspection profile.
* Javadoc cleanup
This commit is contained in:
Joakim Erdfelt 2023-01-19 10:31:27 -06:00 committed by GitHub
parent 0a002d7785
commit a37b8523e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
32 changed files with 1551 additions and 59 deletions

File diff suppressed because it is too large Load Diff

View File

@ -217,7 +217,6 @@ public class InputStreamResponseListener extends Listener.Adapter
/**
* Waits for the given timeout for the whole request/response cycle to be finished,
* then returns the corresponding result.
* <p>
*
* @param timeout the time to wait
* @param unit the timeout unit

View File

@ -129,7 +129,7 @@ public class ProxyConfiguration
}
/**
* @return the list of origins that must be proxied
* @return the set of origins that must be proxied
* @see #matches(Origin)
* @see #getExcludedAddresses()
*/
@ -139,7 +139,7 @@ public class ProxyConfiguration
}
/**
* @return the list of origins that must not be proxied.
* @return the set of origins that must not be proxied.
* @see #matches(Origin)
* @see #getIncludedAddresses()
*/

View File

@ -40,7 +40,6 @@ import org.slf4j.LoggerFactory;
* <p>Works in conjunction with {@link HttpClientTransportDynamic}
* so that the protocol to upgrade to must be one of the application
* protocols supported by HttpClientTransportDynamic.</p>
* <p></p>
*/
public class ProtocolHttpUpgrader implements HttpUpgrader
{

View File

@ -574,12 +574,6 @@ public class HttpCookie
/**
* Check if all old parameters match the new parameters.
*
* @param oldName
* @param oldDomain
* @param oldPath
* @param newName
* @param newDomain
* @param newPath
* @return true if old and new names match exactly and the old and new domains match case-insensitively and the paths match exactly
*/
private static boolean match(String oldName, String oldDomain, String oldPath, String newName, String newDomain, String newPath)

View File

@ -30,7 +30,7 @@ import org.eclipse.jetty.util.annotation.ManagedOperation;
/**
* The {@code maxHeapMemory} and {@code maxDirectMemory} default heuristic is to use {@link Runtime#maxMemory()}
* divided by 4.</p>
* divided by 4.
*/
@ManagedObject
abstract class AbstractByteBufferPool implements ByteBufferPool

View File

@ -33,8 +33,10 @@ import org.slf4j.LoggerFactory;
/**
* AbstractContextProvider
*
* <p>
* Base class for DeploymentManager Providers that can deploy ContextHandlers into
* Jetty that have been discovered via OSGI either as bundles or services.
* </p>
*/
public abstract class AbstractContextProvider extends AbstractLifeCycle implements AppProvider
{

View File

@ -14,9 +14,7 @@
package org.eclipse.jetty.osgi;
import java.io.File;
import java.net.URI;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Dictionary;
@ -30,7 +28,6 @@ import org.eclipse.jetty.deploy.DeploymentManager;
import org.eclipse.jetty.ee.Deployable;
import org.eclipse.jetty.osgi.util.BundleFileLocatorHelperFactory;
import org.eclipse.jetty.server.handler.ContextHandler;
import org.eclipse.jetty.util.FileID;
import org.eclipse.jetty.util.StringUtil;
import org.eclipse.jetty.util.resource.Resource;
import org.eclipse.jetty.util.resource.ResourceFactory;
@ -60,7 +57,6 @@ public class OSGiApp extends App
* Get the install location of a Bundle as a Path
* @param bundle the Bundle whose location to return
* @return the installed location of the Bundle as a Path
* @throws Exception
*/
private static Path getBundlePath(Bundle bundle) throws Exception
{
@ -77,7 +73,6 @@ public class OSGiApp extends App
* as found on equinox. Eg file:///a/b/c/org.eclipse.osgi/89/0/bundleFile
* @param bundle the bundle
* @return a Resource representing the bundle's installed location
* @throws Exception
*/
private static Resource getBundleAsResource(Bundle bundle) throws Exception
{
@ -93,7 +88,7 @@ public class OSGiApp extends App
/**
* Get or create a contextPath from bundle headers and information
*
* @param bundle
* @param bundle the bundle
* @return a contextPath
*/
private static String getContextPath(Bundle bundle)
@ -229,8 +224,6 @@ public class OSGiApp extends App
/**
* Register the Jetty deployed context/webapp as a service, as
* according to the OSGi Web Application Specification.
*
* @throws Exception
*/
public void registerAsOSGiService() throws Exception
{

View File

@ -383,7 +383,7 @@ public class DefaultBundleClassLoaderHelper implements BundleClassLoaderHelper
{
try
{
/**
/*
* In Concierge:
*
* Option A:

View File

@ -108,8 +108,6 @@ public class Util
* @param bundleSymbolicNames comma separated list of symbolic bundle names
* @param bundleContext the bundle on whose behalf to resolve
* @return List of resolved Paths matching the bundle symbolic names
*
* @throws Exception
*/
public static List<Path> getPathsToBundlesBySymbolicNames(String bundleSymbolicNames, BundleContext bundleContext)
throws Exception

View File

@ -96,7 +96,6 @@ public abstract class QuicheConnection
* @param local the local address on which the buffer was received.
* @param peer the address of the peer from which the buffer was received.
* @return how many bytes were consumed.
* @throws IOException
*/
public abstract int feedCipherBytes(ByteBuffer buffer, SocketAddress local, SocketAddress peer) throws IOException;
@ -104,7 +103,6 @@ public abstract class QuicheConnection
* Fill the given buffer with cipher text to be sent.
* @param buffer the buffer to fill.
* @return how many bytes were added to the buffer.
* @throws IOException
*/
public abstract int drainCipherBytes(ByteBuffer buffer) throws IOException;

View File

@ -441,7 +441,6 @@ public class JnaQuicheConnection extends QuicheConnection
* Fill the given buffer with cipher text to be sent.
* @param buffer the buffer to fill.
* @return how many bytes were added to the buffer.
* @throws IOException
*/
@Override
public int drainCipherBytes(ByteBuffer buffer) throws IOException

View File

@ -22,7 +22,6 @@ import org.eclipse.jetty.util.annotation.Name;
/**
* <p>A rule to rewrite the path and query that match a regular expression pattern with a fixed string.</p>
* <p>The replacement String follows standard {@link Matcher#replaceAll(String)} behavior, including named groups</p>
* <p></p>
*/
public class RewriteRegexRule extends RegexRule
{

View File

@ -51,8 +51,8 @@ public interface Context extends Attributes, Decorator, Executor
MimeTypes getMimeTypes();
@Override
/** execute runnable in container thread scoped to context */
@Override
void execute(Runnable runnable);
/** scope the calling thread to the context and run the runnable. */

View File

@ -372,7 +372,7 @@ public class ContextHandler extends Handler.Wrapper implements Attributes, Grace
* virtual host name. A context with no virtual host names or a null virtual host name is available to all requests that are not served by a context with a
* matching virtual host name.
*
* @return Array of virtual hosts that this context responds to. A null/empty array means any hostname is acceptable. Host names may be String
* @return list of virtual hosts that this context responds to. A null/empty array means any hostname is acceptable. Host names may be String
* representation of IP addresses. Host names may start with '*.' to wildcard one level of names. Hosts and wildcard hosts may be followed with
* '@connectorname', in which case they will match only if the the {@link Connector#getName()} for the request also matches. If an entry is just
* '@connectorname' it will match any host if that connector was used. Note - In previous versions if one or more connectorname only entries existed

View File

@ -410,7 +410,7 @@ public abstract class AbstractSessionCache extends ContainerLifeCycle implements
* to the cache. The usage count of the fresh session is incremented.
*
* @param id the id
* @param session
* @param session the session
*/
@Override
public void add(String id, Session session) throws Exception

View File

@ -94,9 +94,8 @@ public interface SessionCache extends LifeCycle
* Adds a new Session, with a never-before-used id,
* to the cache.
*
* @param id
* @param session
* @throws Exception
* @param id id
* @param session session
*/
void add(String id, Session session) throws Exception;
@ -271,7 +270,7 @@ public interface SessionCache extends LifeCycle
/**
* If true, all existing sessions in the cache will be invalidated when
* the server shuts down. Default is false.
* @param invalidateOnShutdown
* @param invalidateOnShutdown true invalidate all sessions in cache on server shutdown
*/
void setInvalidateOnShutdown(boolean invalidateOnShutdown);

View File

@ -472,7 +472,7 @@ public class StartArgs
* For full list of enabled modules, use {@link Modules#getEnabled()}
* </p>
*
* @return the list of selected modules (by name) that the configuration has.
* @return the set of selected modules (by name) that the configuration has.
* @see Modules#getEnabled()
*/
public Set<String> getSelectedModules()

View File

@ -76,13 +76,13 @@ public class Version implements Comparable<Version>
parse(versionString);
}
@Override
/**
* Compares with other version. Does not take extension into account, as there is no reliable way to order them.
*
* @param other the other version to compare this to
* @return -1 if this is older version that other, 0 if its same version, 1 if it's newer version than other
*/
@Override
public int compareTo(Version other)
{
if (other == null)

View File

@ -38,7 +38,7 @@ import org.xml.sax.SAXException;
* <dd>minimum requirement (type defaults to <code>jar</code>, with no classifier)</dd>
* <dt>{@code maven://<groupId>/<artifactId>/<version>/<type>}</dt>
* <dd>optional type requirement</dd>
* <dt><code>{@code maven://<groupId>/<artifactId>/<version>/<type>/<classifier>}</code></dt>
* <dt>{@code maven://<groupId>/<artifactId>/<version>/<type>/<classifier>}</dt>
* <dd>optional type and classifier requirement</dd>
* </dl>
*/

View File

@ -88,14 +88,14 @@ public class FileID
* for the extension (if any), excluding the dot, lower-cased.
* </p>
*
* <code>{@code
* <pre>{@code
* "foo.tar.gz" "gz"
* "foo.bar" "bar"
* "foo." ""
* "foo" null
* ".bar" null
* null null
* }</code>
* }</pre>
*
* @param uri The URI to search
* @return The last segment extension. Null if input uri is null, or scheme is null, or URI is not a `jar:file:` or `file:` based URI
@ -142,14 +142,14 @@ public class FileID
* for the extension (if any), excluding the dot, lower-cased.
* </p>
*
* <code>{@code
* <pre>{@code
* "foo.tar.gz" "gz"
* "foo.bar" "bar"
* "foo." ""
* "foo" null
* ".bar" null
* null null
* }</code>
* }</pre>
*
* @param path The string path
* @return The last segment extension, or null if not a file, or null if there is no extension present

View File

@ -17,11 +17,10 @@ import java.util.Set;
import java.util.function.Predicate;
/**
* Utility class to maintain a set of inclusions and exclusions.
* <p>Utility class to maintain a set of inclusions and exclusions.</p>
* <p>This extension of the {@link IncludeExcludeSet} class is used
* when the type of the set elements is the same as the type of
* the predicate test.
* <p>
* the predicate test.</p>
*
* @param <ITEM> The type of element
*/

View File

@ -20,13 +20,12 @@ import java.util.Set;
import java.util.function.Predicate;
/**
* Utility class to maintain a set of inclusions and exclusions.
* <p>Utility class to maintain a set of inclusions and exclusions.</p>
* <p>Maintains a set of included and excluded elements. The method {@link #test(Object)}
* will return true IFF the passed object is not in the excluded set AND ( either the
* included set is empty OR the object is in the included set)
* included set is empty OR the object is in the included set)</p>
* <p>The type of the underlying {@link Set} used may be passed into the
* constructor, so special sets like Servlet PathMap may be used.
* <p>
* constructor, so special sets like Servlet PathMap may be used.</p>
*
* @param <T> The type of element of the set (often a pattern)
* @param <P> The type of the instance passed to the predicate

View File

@ -358,6 +358,7 @@ public class PathResource extends Resource
* </p>
*
* <table>
* <caption>Alias Check Logic</caption>
* <thead>
* <tr>
* <th>path</th>

View File

@ -150,7 +150,7 @@ public class Constraint implements Cloneable, Serializable
}
/**
* @return List of roles for this constraint.
* @return String array of roles for this constraint.
*/
public String[] getRoles()
{

View File

@ -9,7 +9,7 @@
* all copies.
*/
/**
/*
* Unix crypt(3C) utility
*
* @version 0.9, 11/25/96
@ -28,11 +28,6 @@
* by Iris Van den Broeke, Daniel Deville
*/
/**
* modified April 2001
* by Iris Van den Broeke, Daniel Deville
*/
package org.eclipse.jetty.util.security;
import java.nio.charset.StandardCharsets;

View File

@ -15,7 +15,6 @@ package org.eclipse.jetty.websocket.core.internal;
import java.nio.channels.ClosedChannelException;
import org.eclipse.jetty.util.Callback;
import org.eclipse.jetty.util.thread.AutoLock;
import org.eclipse.jetty.websocket.core.CloseStatus;
import org.eclipse.jetty.websocket.core.Frame;
@ -129,7 +128,7 @@ public class WebSocketSessionState
* </p>
* <p>
* This should only be called if there is an error directly before the call to
* {@link WebSocketCoreSession#closeConnection(CloseStatus, Callback)}.
* {@code WebSocketCoreSession.closeConnection(CloseStatus, Callback)}.
* </p>
* <p>
* This could occur if the FrameHandler throws an exception in onFrame after receiving a close frame reply, in this

View File

@ -30,9 +30,11 @@ import org.slf4j.LoggerFactory;
/**
* AbstractDatabaseLoginModule
*
* <p>
* Abstract base class for LoginModules that interact with a
* database to retrieve authentication and authorization information.
* Used by the JDBCLoginModule and DataSourceLoginModule.
* </p>
*/
public abstract class AbstractDatabaseLoginModule extends AbstractLoginModule
{

View File

@ -775,12 +775,12 @@ public abstract class AbstractProxyServlet extends HttpServlet
* <p>Utility class that implement transparent proxy functionalities.</p>
* <p>Configuration parameters:</p>
* <ul>
* <li>{@code proxyTo} - a mandatory URI like http://host:80/context to which the request is proxied.</li>
* <li>{@code proxyTo} - a mandatory URI like {@code http://host:80/context} to which the request is proxied.</li>
* <li>{@code prefix} - an optional URI prefix that is stripped from the start of the forwarded URI.</li>
* </ul>
* <p>For example, if a request is received at "/foo/bar", the {@code proxyTo} parameter is
* "http://host:80/context" and the {@code prefix} parameter is "/foo", then the request would
* be proxied to "http://host:80/context/bar".
* {@code http://host:80/context} and the {@code prefix} parameter is "/foo", then the request would
* be proxied to {@code http://host:80/context/bar}.
*/
protected static class TransparentDelegate
{

View File

@ -38,11 +38,13 @@ import static org.junit.jupiter.api.Assertions.fail;
/**
* AbstractClusteredInvalidationSessionTest
*
* <p>
* Goal of the test is to be sure that invalidating a session on one node
* result in the session being unavailable in the other node also. This
* simulates an environment without a sticky load balancer. In this case,
* you must use session eviction, to try to ensure that as the session
* bounces around it gets a fresh load of data from the SessionDataStore.
* </p>
*/
public abstract class AbstractClusteredInvalidationSessionTest extends AbstractSessionTestBase
{

View File

@ -30,9 +30,11 @@ import org.slf4j.LoggerFactory;
/**
* AbstractDatabaseLoginModule
*
* <p>
* Abstract base class for LoginModules that interact with a
* database to retrieve authentication and authorization information.
* Used by the JDBCLoginModule and DataSourceLoginModule.
* </p>
*/
public abstract class AbstractDatabaseLoginModule extends AbstractLoginModule
{

View File

@ -456,6 +456,7 @@ public class ResourceHandler extends HandlerWrapper implements ResourceFactory,
* @param baseResource The base resource as a string.
* @deprecated use {@link #setBaseResource(Resource)}
*/
@Deprecated
public void setBaseResourceAsString(String baseResource)
{
try