You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by el...@apache.org on 2025/09/17 14:01:36 UTC
(maven-mvnd) 01/01: Follow Oracle Javadoc conventions
This is an automated email from the ASF dual-hosted git repository.
elharo pushed a commit to branch jd
in repository https://gitbox.apache.org/repos/asf/maven-mvnd.git
commit f6293205c2be85930f7e22252f8597e568995123
Author: Elliotte Rusty Harold <el...@ibiblio.org>
AuthorDate: Wed Sep 17 10:01:25 2025 -0400
Follow Oracle Javadoc conventions
---
.../org/mvndaemon/mvnd/plugin/doc/DocMojo.java | 6 ++-
.../mvnd/client/DaemonClientConnection.java | 4 +-
.../org/mvndaemon/mvnd/client/DaemonConnector.java | 2 +-
.../mvndaemon/mvnd/client/DaemonDiagnostics.java | 6 +--
.../mvndaemon/mvnd/client/DaemonParameters.java | 10 ++---
.../org/mvndaemon/mvnd/common/BufferCaster.java | 4 +-
.../org/mvndaemon/mvnd/common/BufferHelper.java | 10 ++---
.../mvnd/common/DaemonCompatibilitySpec.java | 2 +-
.../mvndaemon/mvnd/common/DaemonConnection.java | 3 +-
.../mvnd/common/DaemonExpirationStatus.java | 2 +-
.../java/org/mvndaemon/mvnd/common/DaemonInfo.java | 2 +-
.../org/mvndaemon/mvnd/common/DaemonRegistry.java | 2 +-
.../org/mvndaemon/mvnd/common/DaemonState.java | 2 +-
.../org/mvndaemon/mvnd/common/DaemonStopEvent.java | 2 +-
.../org/mvndaemon/mvnd/common/Environment.java | 46 +++++++++++-----------
.../mvndaemon/mvnd/common/InterpolationHelper.java | 30 +++++++-------
.../java/org/mvndaemon/mvnd/common/Message.java | 8 +++-
.../java/org/mvndaemon/mvnd/common/OptionType.java | 8 ++--
.../java/org/mvndaemon/mvnd/common/OsUtils.java | 6 +--
.../org/mvndaemon/mvnd/common/SignalHelper.java | 2 +-
.../java/org/mvndaemon/mvnd/common/TimeUtils.java | 6 +--
.../mvnd/common/logging/TerminalInputHandler.java | 2 +-
.../mvnd/common/logging/TerminalOutput.java | 10 +++--
.../maven/cli/CommonsCliDaemonMavenOptions.java | 4 +-
.../main/java/org/apache/maven/cli/DaemonCli.java | 2 +-
.../main/java/org/mvndaemon/mvnd/cache/Cache.java | 18 ++++-----
.../org/mvndaemon/mvnd/cache/CacheFactory.java | 8 ++--
.../java/org/mvndaemon/mvnd/cache/CacheRecord.java | 2 +-
.../mvnd/cache/impl/TimestampCacheFactory.java | 4 +-
.../mvndaemon/mvnd/daemon/DaemonExpiration.java | 2 +-
.../mvndaemon/mvnd/daemon/DaemonInputStream.java | 2 +-
.../java/org/mvndaemon/mvnd/nativ/CLibrary.java | 2 +-
.../org/mvndaemon/mvnd/nativ/MvndNativeLoader.java | 22 +++++------
33 files changed, 126 insertions(+), 115 deletions(-)
diff --git a/build-plugin/src/main/java/org/mvndaemon/mvnd/plugin/doc/DocMojo.java b/build-plugin/src/main/java/org/mvndaemon/mvnd/plugin/doc/DocMojo.java
index e2884916..41be835d 100644
--- a/build-plugin/src/main/java/org/mvndaemon/mvnd/plugin/doc/DocMojo.java
+++ b/build-plugin/src/main/java/org/mvndaemon/mvnd/plugin/doc/DocMojo.java
@@ -63,11 +63,13 @@ public class DocMojo extends AbstractMojo {
@Parameter(readonly = true, defaultValue = "${project.basedir}")
File baseDir;
- /** A list of fully qualified enum names to process */
+ /** A list of fully qualified enum names to process. */
@Parameter(defaultValue = "org.mvndaemon.mvnd.common.Environment,org.mvndaemon.mvnd.common.OptionType")
String[] enums;
- /** If {@code true} the execution of this mojo will be skipped altogether; otherwise this mojo will be executed. */
+ /**
+ * If {@code true} the execution of this mojo will be skipped altogether; otherwise this mojo will be executed.
+ */
@Parameter(defaultValue = "false", property = "mvnd.build.doc.skip")
boolean skip;
diff --git a/client/src/main/java/org/mvndaemon/mvnd/client/DaemonClientConnection.java b/client/src/main/java/org/mvndaemon/mvnd/client/DaemonClientConnection.java
index 5ae288c7..119a80b7 100644
--- a/client/src/main/java/org/mvndaemon/mvnd/client/DaemonClientConnection.java
+++ b/client/src/main/java/org/mvndaemon/mvnd/client/DaemonClientConnection.java
@@ -41,7 +41,7 @@ import org.slf4j.LoggerFactory;
/**
* File origin:
- * https://github.com/gradle/gradle/blob/v5.6.2/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/client/DaemonClientConnection.java
+ * https://github.com/gradle/gradle/blob/v5.6.2/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/client/DaemonClientConnection.java.
*/
public class DaemonClientConnection implements Closeable {
@@ -176,7 +176,7 @@ public class DaemonClientConnection implements Closeable {
public interface StaleAddressDetector {
/**
- * @return true if the failure should be considered due to a stale address.
+ * @return true if the failure should be considered due to a stale address
*/
boolean maybeStaleAddress(Exception failure);
}
diff --git a/client/src/main/java/org/mvndaemon/mvnd/client/DaemonConnector.java b/client/src/main/java/org/mvndaemon/mvnd/client/DaemonConnector.java
index 1302f655..7dce421b 100644
--- a/client/src/main/java/org/mvndaemon/mvnd/client/DaemonConnector.java
+++ b/client/src/main/java/org/mvndaemon/mvnd/client/DaemonConnector.java
@@ -64,7 +64,7 @@ import static org.mvndaemon.mvnd.common.DaemonState.Canceled;
/**
* File origin:
- * https://github.com/gradle/gradle/blob/v5.6.2/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/client/DefaultDaemonConnector.java
+ * https://github.com/gradle/gradle/blob/v5.6.2/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/client/DefaultDaemonConnector.java.
*/
public class DaemonConnector {
diff --git a/client/src/main/java/org/mvndaemon/mvnd/client/DaemonDiagnostics.java b/client/src/main/java/org/mvndaemon/mvnd/client/DaemonDiagnostics.java
index a2135e6a..ed103e82 100644
--- a/client/src/main/java/org/mvndaemon/mvnd/client/DaemonDiagnostics.java
+++ b/client/src/main/java/org/mvndaemon/mvnd/client/DaemonDiagnostics.java
@@ -31,7 +31,7 @@ import java.util.stream.Collector;
/**
* File origin:
- * https://github.com/gradle/gradle/blob/v5.6.2/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/diagnostics/DaemonDiagnostics.java
+ * https://github.com/gradle/gradle/blob/v5.6.2/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/diagnostics/DaemonDiagnostics.java.
*/
public class DaemonDiagnostics {
@@ -82,8 +82,8 @@ public class DaemonDiagnostics {
}
/**
- * @param path to read from tail
- * @return tail content
+ * @param path to read from tail
+ * @return tail content
* @throws IOException when reading failed
*/
static String tail(Path path) throws IOException {
diff --git a/client/src/main/java/org/mvndaemon/mvnd/client/DaemonParameters.java b/client/src/main/java/org/mvndaemon/mvnd/client/DaemonParameters.java
index 9f7b8763..eae27f32 100644
--- a/client/src/main/java/org/mvndaemon/mvnd/client/DaemonParameters.java
+++ b/client/src/main/java/org/mvndaemon/mvnd/client/DaemonParameters.java
@@ -55,7 +55,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- * Hold all daemon configuration
+ * Hold all daemon configuration.
*/
public class DaemonParameters {
@@ -289,7 +289,7 @@ public class DaemonParameters {
/**
* @return the number of threads (same syntax as Maven's {@code -T}/{@code --threads} option) to pass to the daemon
- * unless the user passes his own `-T` or `--threads`.
+ * unless the user passes his own `-T` or `--threads`
*/
public String threads() {
return property(Environment.MVND_THREADS)
@@ -326,7 +326,7 @@ public class DaemonParameters {
}
/**
- * @return <code>true</code> if maven should be executed within this process instead of spawning a daemon.
+ * @return <code>true</code> if maven should be executed within this process instead of spawning a daemon
*/
public boolean noDaemon() {
return value(Environment.MVND_NO_DAEMON)
@@ -337,7 +337,7 @@ public class DaemonParameters {
}
/**
- * @return <code>true</code> if maven should be executed in debug mode.
+ * @return <code>true</code> if maven should be executed in debug mode
*/
public boolean debug() {
return value(Environment.MVND_DEBUG).orSystemProperty().orDefault().asBoolean();
@@ -570,7 +570,7 @@ public class DaemonParameters {
}
/**
- * Mostly for debugging
+ * Mostly for debugging.
*/
@Override
public String toString() {
diff --git a/common/src/main/java/org/mvndaemon/mvnd/common/BufferCaster.java b/common/src/main/java/org/mvndaemon/mvnd/common/BufferCaster.java
index 38d2ff52..818b5848 100644
--- a/common/src/main/java/org/mvndaemon/mvnd/common/BufferCaster.java
+++ b/common/src/main/java/org/mvndaemon/mvnd/common/BufferCaster.java
@@ -22,12 +22,12 @@ import java.nio.Buffer;
/**
* File origin:
- * https://github.com/gradle/gradle/blob/v5.6.2/subprojects/base-services/src/main/java/org/gradle/internal/io/BufferCaster.java
+ * https://github.com/gradle/gradle/blob/v5.6.2/subprojects/base-services/src/main/java/org/gradle/internal/io/BufferCaster.java.
*/
public class BufferCaster {
/**
* Without this cast, when the code compiled by Java 9+ is executed on Java 8, it will throw
- * java.lang.NoSuchMethodError: Method flip()Ljava/nio/ByteBuffer; does not exist in class java.nio.ByteBuffer
+ * java.lang.NoSuchMethodError: Method flip()Ljava/nio/ByteBuffer; does not exist in class java.nio.ByteBuffer.
*/
@SuppressWarnings("RedundantCast")
public static <T extends Buffer> Buffer cast(T byteBuffer) {
diff --git a/common/src/main/java/org/mvndaemon/mvnd/common/BufferHelper.java b/common/src/main/java/org/mvndaemon/mvnd/common/BufferHelper.java
index e9d7aecd..3ecf0c6e 100644
--- a/common/src/main/java/org/mvndaemon/mvnd/common/BufferHelper.java
+++ b/common/src/main/java/org/mvndaemon/mvnd/common/BufferHelper.java
@@ -50,8 +50,8 @@ public class BufferHelper {
/**
* Attempts to clean a direct {@link ByteBuffer}, releasing its underlying memory.
*
- * @param byteBuffer The direct ByteBuffer to clean.
- * @return {@code true} if the cleaner was successfully invoked, {@code false} otherwise.
+ * @param byteBuffer the direct ByteBuffer to clean
+ * @return {@code true} if the cleaner was successfully invoked, {@code false} otherwise
*/
public static boolean closeDirectByteBuffer(ByteBuffer byteBuffer) {
return closeDirectByteBuffer(byteBuffer, null);
@@ -61,9 +61,9 @@ public class BufferHelper {
* Attempts to clean a direct {@link ByteBuffer}, releasing its underlying memory.
* Logs any errors via the provided logger.
*
- * @param byteBuffer The direct ByteBuffer to clean.
- * @param log A consumer to log any potential errors, may be {@code null}.
- * @return {@code true} if the cleaner was successfully invoked, {@code false} otherwise.
+ * @param byteBuffer the direct ByteBuffer to clean
+ * @param log a consumer to log any potential errors, may be {@code null}
+ * @return {@code true} if the cleaner was successfully invoked, {@code false} otherwise
*/
public static boolean closeDirectByteBuffer(ByteBuffer byteBuffer, Consumer<String> log) {
if (byteBuffer != null && byteBuffer.isDirect()) {
diff --git a/common/src/main/java/org/mvndaemon/mvnd/common/DaemonCompatibilitySpec.java b/common/src/main/java/org/mvndaemon/mvnd/common/DaemonCompatibilitySpec.java
index d18e45dd..7d17f303 100644
--- a/common/src/main/java/org/mvndaemon/mvnd/common/DaemonCompatibilitySpec.java
+++ b/common/src/main/java/org/mvndaemon/mvnd/common/DaemonCompatibilitySpec.java
@@ -26,7 +26,7 @@ import java.util.function.Supplier;
/**
* File origin:
- * https://github.com/gradle/gradle/blob/v5.6.2/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/context/DaemonCompatibilitySpec.java
+ * https://github.com/gradle/gradle/blob/v5.6.2/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/context/DaemonCompatibilitySpec.java.
*/
public class DaemonCompatibilitySpec {
diff --git a/common/src/main/java/org/mvndaemon/mvnd/common/DaemonConnection.java b/common/src/main/java/org/mvndaemon/mvnd/common/DaemonConnection.java
index ddd15ee8..19ac4133 100755
--- a/common/src/main/java/org/mvndaemon/mvnd/common/DaemonConnection.java
+++ b/common/src/main/java/org/mvndaemon/mvnd/common/DaemonConnection.java
@@ -40,8 +40,7 @@ import org.slf4j.LoggerFactory;
/**
* File origin:
- * https://github.com/gradle/gradle/blob/v5.6.2/subprojects/messaging/src/main/java/org/gradle/internal/remote/internal/inet/SocketConnection.java
- *
+ * https://github.com/gradle/gradle/blob/v5.6.2/subprojects/messaging/src/main/java/org/gradle/internal/remote/internal/inet/SocketConnection.java.
*/
public class DaemonConnection implements AutoCloseable {
diff --git a/common/src/main/java/org/mvndaemon/mvnd/common/DaemonExpirationStatus.java b/common/src/main/java/org/mvndaemon/mvnd/common/DaemonExpirationStatus.java
index 57b07d5a..284e4a31 100644
--- a/common/src/main/java/org/mvndaemon/mvnd/common/DaemonExpirationStatus.java
+++ b/common/src/main/java/org/mvndaemon/mvnd/common/DaemonExpirationStatus.java
@@ -25,7 +25,7 @@ package org.mvndaemon.mvnd.common;
* results.
*
* File origin:
- * https://github.com/gradle/gradle/blob/v6.5.1/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/server/expiry/DaemonExpirationStatus.java
+ * https://github.com/gradle/gradle/blob/v6.5.1/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/server/expiry/DaemonExpirationStatus.java.
*/
public enum DaemonExpirationStatus {
DO_NOT_EXPIRE,
diff --git a/common/src/main/java/org/mvndaemon/mvnd/common/DaemonInfo.java b/common/src/main/java/org/mvndaemon/mvnd/common/DaemonInfo.java
index eb86ef45..59efd510 100644
--- a/common/src/main/java/org/mvndaemon/mvnd/common/DaemonInfo.java
+++ b/common/src/main/java/org/mvndaemon/mvnd/common/DaemonInfo.java
@@ -25,7 +25,7 @@ import static org.mvndaemon.mvnd.common.DaemonState.Idle;
/**
* File origin:
- * https://github.com/gradle/gradle/blob/v5.6.2/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/registry/DaemonInfo.java
+ * https://github.com/gradle/gradle/blob/v5.6.2/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/registry/DaemonInfo.java.
*/
public class DaemonInfo {
diff --git a/common/src/main/java/org/mvndaemon/mvnd/common/DaemonRegistry.java b/common/src/main/java/org/mvndaemon/mvnd/common/DaemonRegistry.java
index 7826ba9e..328edd3f 100644
--- a/common/src/main/java/org/mvndaemon/mvnd/common/DaemonRegistry.java
+++ b/common/src/main/java/org/mvndaemon/mvnd/common/DaemonRegistry.java
@@ -51,7 +51,7 @@ import static org.mvndaemon.mvnd.common.DaemonState.Idle;
* <p>
* File origin:
* https://github.com/gradle/gradle/blob/v5.6.2/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/registry/DaemonRegistry.java
- * https://github.com/OpenHFT/Java-Lang/blob/master/lang/src/main/java/net/openhft/lang/io/AbstractBytes.java
+ * https://github.com/OpenHFT/Java-Lang/blob/master/lang/src/main/java/net/openhft/lang/io/AbstractBytes.java.
*/
public class DaemonRegistry implements AutoCloseable {
diff --git a/common/src/main/java/org/mvndaemon/mvnd/common/DaemonState.java b/common/src/main/java/org/mvndaemon/mvnd/common/DaemonState.java
index 5c4158c0..82ea7223 100644
--- a/common/src/main/java/org/mvndaemon/mvnd/common/DaemonState.java
+++ b/common/src/main/java/org/mvndaemon/mvnd/common/DaemonState.java
@@ -20,7 +20,7 @@ package org.mvndaemon.mvnd.common;
/**
* File origin
- * https://github.com/gradle/gradle/blob/v5.6.2/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/server/api/DaemonStateControl.java
+ * https://github.com/gradle/gradle/blob/v5.6.2/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/server/api/DaemonStateControl.java.
*/
public enum DaemonState {
Idle,
diff --git a/common/src/main/java/org/mvndaemon/mvnd/common/DaemonStopEvent.java b/common/src/main/java/org/mvndaemon/mvnd/common/DaemonStopEvent.java
index e36e5d35..1d969608 100644
--- a/common/src/main/java/org/mvndaemon/mvnd/common/DaemonStopEvent.java
+++ b/common/src/main/java/org/mvndaemon/mvnd/common/DaemonStopEvent.java
@@ -27,7 +27,7 @@ import java.util.Objects;
* Information regarding when and why a daemon was stopped.
*
* File origin:
- * https://github.com/gradle/gradle/blob/v5.6.2/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/registry/DaemonStopEvent.java
+ * https://github.com/gradle/gradle/blob/v5.6.2/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/registry/DaemonStopEvent.java.
*/
public class DaemonStopEvent implements Serializable {
diff --git a/common/src/main/java/org/mvndaemon/mvnd/common/Environment.java b/common/src/main/java/org/mvndaemon/mvnd/common/Environment.java
index 110dc653..ecb5b3a4 100644
--- a/common/src/main/java/org/mvndaemon/mvnd/common/Environment.java
+++ b/common/src/main/java/org/mvndaemon/mvnd/common/Environment.java
@@ -55,13 +55,13 @@ public enum Environment {
* Delete log files under the <code>mvnd.registry</code> directory that are older than <code>mvnd.logPurgePeriod</code>
*/
PURGE(null, null, null, OptionType.VOID, Flags.OPTIONAL, "mvnd:--purge"),
- /** Prints the status of daemon instances registered in the registry specified by <code>mvnd.registry</code> */
+ /** Prints the status of daemon instances registered in the registry specified by <code>mvnd.registry</code>. */
STATUS(null, null, null, OptionType.VOID, Flags.OPTIONAL, "mvnd:--status"),
- /** Stop all daemon instances registered in the registry specified by <code>mvnd.registry</code> */
+ /** Stop all daemon instances registered in the registry specified by <code>mvnd.registry</code>. */
STOP(null, null, null, OptionType.VOID, Flags.OPTIONAL, "mvnd:--stop"),
- /** Terminal diagnosis */
+ /** Terminal diagnosis. */
DIAG(null, null, null, OptionType.VOID, Flags.OPTIONAL, "mvnd:--diag"),
- /** Use one thread, no log buffering and the default project builder to behave like a standard maven */
+ /** Use one thread, no log buffering and the default project builder to behave like a standard maven. */
SERIAL("mvnd.serial", null, Boolean.FALSE, OptionType.VOID, Flags.OPTIONAL, "mvnd:-1", "mvnd:--serial"),
//
@@ -71,22 +71,22 @@ public enum Environment {
JAVA_HOME("java.home", "JAVA_HOME", null, OptionType.PATH, Flags.DOCUMENTED_AS_DISCRIMINATING),
/**
* The daemon installation directory. The client normally sets this according to where its <code>mvnd</code>
- * executable is located
+ * executable is located.
*/
MVND_HOME("mvnd.home", "MVND_HOME", null, OptionType.PATH, Flags.DISCRIMINATING),
- /** The user home directory */
+ /** The user home directory. */
USER_HOME("user.home", null, null, OptionType.PATH, Flags.NONE),
- /** The current working directory */
+ /** The current working directory. */
USER_DIR("user.dir", null, null, OptionType.PATH, Flags.NONE),
- /** The JDK_JAVA_OPTIONS option */
+ /** The JDK_JAVA_OPTIONS option. */
JDK_JAVA_OPTIONS("jdk.java.options", "JDK_JAVA_OPTIONS", "", OptionType.STRING, Flags.DISCRIMINATING),
//
// Maven properties
//
- /** The path to the Maven local repository */
+ /** The path to the Maven local repository. */
MAVEN_REPO_LOCAL("maven.repo.local", null, null, OptionType.PATH, Flags.DISCRIMINATING | Flags.OPTIONAL),
- /** The location of the maven settings file */
+ /** The location of the maven settings file. */
MAVEN_SETTINGS(
"maven.settings",
null,
@@ -95,23 +95,23 @@ public enum Environment {
Flags.DISCRIMINATING | Flags.OPTIONAL,
"mvn:-s",
"mvn:--settings"),
- /** The pom or directory to build */
+ /** The pom or directory to build. */
MAVEN_FILE(null, null, null, OptionType.PATH, Flags.NONE, "mvn:-f", "mvn:--file"),
- /** The root directory of the current multi module Maven project */
+ /** The root directory of the current multi module Maven project. */
MAVEN_MULTIMODULE_PROJECT_DIRECTORY("maven.multiModuleProjectDirectory", null, null, OptionType.PATH, Flags.NONE),
- /** Log file */
+ /** Log file. */
MAVEN_LOG_FILE(null, null, null, OptionType.PATH, Flags.INTERNAL, "mvn:-l", "mvn:--log-file"),
- /** Batch mode */
+ /** Batch mode. */
MAVEN_BATCH_MODE(null, null, null, OptionType.BOOLEAN, Flags.INTERNAL, "mvn:-B", "mvn:--batch-mode"),
- /** Verbose */
+ /** Verbose. */
MAVEN_VERBOSE(null, null, null, OptionType.BOOLEAN, Flags.INTERNAL, "mvn:-X", "mvn:--verbose"),
- /** Version */
+ /** Version. */
MAVEN_VERSION(null, null, null, OptionType.BOOLEAN, Flags.INTERNAL, "mvn:-v", "mvn:-version", "mvn:--version"),
- /** Show version */
+ /** Show version. */
MAVEN_SHOW_VERSION(null, null, null, OptionType.BOOLEAN, Flags.INTERNAL, "mvn:-V", "mvn:--show-version"),
- /** Define */
+ /** Define. */
MAVEN_DEFINE(null, null, null, OptionType.STRING, Flags.INTERNAL, "mvn:-D", "mvn:--define"),
- /** Whether the output should be styled using ANSI color codes; possible values: auto, always, never */
+ /** Whether the output should be styled using ANSI color codes; possible values: auto, always, never. */
MAVEN_COLOR("maven.style.color", null, "auto", OptionType.STRING, Flags.OPTIONAL, "mvnd:--color"),
//
@@ -271,7 +271,7 @@ public enum Environment {
MVND_DUPLICATE_DAEMON_GRACE_PERIOD(
"mvnd.duplicateDaemonGracePeriod", null, "10 seconds", OptionType.DURATION, Flags.DISCRIMINATING),
/**
- * Internal property to tell the daemon the width of the terminal
+ * Internal property to tell the daemon the width of the terminal.
*/
MVND_TERMINAL_WIDTH("mvnd.terminalWidth", null, 0, OptionType.INTEGER, Flags.INTERNAL),
/**
@@ -284,7 +284,7 @@ public enum Environment {
*/
MVND_BUILD_TIME("mvnd.buildTime", null, null, OptionType.BOOLEAN, Flags.NONE),
/**
- * Socket family to use
+ * Socket family to use.
*/
MVND_SOCKET_FAMILY("mvnd.socketFamily", null, "inet", OptionType.STRING, Flags.DISCRIMINATING),
/**
@@ -632,7 +632,9 @@ public enum Environment {
private static final int INTERNAL = 0b10;
private static final int OPTIONAL = 0b100;
- /** Set automatically for entries having {@link #DISCRIMINATING} */
+ /**
+ * Set automatically for entries having {@link #DISCRIMINATING}
+ */
private static final int DOCUMENTED_AS_DISCRIMINATING = 0b1000;
}
}
diff --git a/common/src/main/java/org/mvndaemon/mvnd/common/InterpolationHelper.java b/common/src/main/java/org/mvndaemon/mvnd/common/InterpolationHelper.java
index e8301a89..85be25f5 100644
--- a/common/src/main/java/org/mvndaemon/mvnd/common/InterpolationHelper.java
+++ b/common/src/main/java/org/mvndaemon/mvnd/common/InterpolationHelper.java
@@ -40,7 +40,7 @@ public class InterpolationHelper {
private static final String MARKER = "$__";
/**
- * Callback for substitution
+ * Callback for substitution.
*/
@FunctionalInterface
public interface SubstitutionCallback {
@@ -49,11 +49,11 @@ public class InterpolationHelper {
}
/**
- * Perform substitution on a property set
+ * Perform substitution on a property set.
*
* @param properties the property set to perform substitution on
* @param callback the callback to obtain substitution values
- * @param substituteFromConfig If substitute from configuration
+ * @param substituteFromConfig if substitute from configuration
* @param defaultsToEmptyString sets an empty string if a replacement value is not found, leaves intact
* otherwise
*/
@@ -84,19 +84,19 @@ public class InterpolationHelper {
* properties override system properties.
* </p>
*
- * @param val The string on which to perform property substitution.
- * @param currentKey The key of the property being evaluated used to
- * detect cycles.
- * @param cycleMap Map of variable references used to detect nested cycles.
- * @param configProps Set of configuration properties.
- * @param callback the callback to obtain substitution values
- * @param substituteFromConfig If substitute from configuration
- * @param defaultsToEmptyString sets an empty string if a replacement value is not found, leaves intact
+ * @param val The string on which to perform property substitution
+ * @param currentKey The key of the property being evaluated used to
+ * detect cycles
+ * @param cycleMap Map of variable references used to detect nested cycles
+ * @param configProps Set of configuration properties
+ * @param callback the callback to obtain substitution values
+ * @param substituteFromConfig If substitute from configuration
+ * @param defaultsToEmptyString sets an empty string if a replacement value is not found, leaves intact
* otherwise
- * @return The value of the specified string after system property substitution.
- * @throws IllegalArgumentException If there was a syntax error in the
- * property placeholder syntax or a recursive variable reference.
- **/
+ * @return The value of the specified string after system property substitution
+ * @throws IllegalArgumentException if there was a syntax error in the
+ * property placeholder syntax or a recursive variable reference
+ */
public static String substVars(
String val,
String currentKey,
diff --git a/common/src/main/java/org/mvndaemon/mvnd/common/Message.java b/common/src/main/java/org/mvndaemon/mvnd/common/Message.java
index 2878f3e3..d7f00a24 100644
--- a/common/src/main/java/org/mvndaemon/mvnd/common/Message.java
+++ b/common/src/main/java/org/mvndaemon/mvnd/common/Message.java
@@ -37,9 +37,13 @@ public abstract class Message {
public static final int BUILD_REQUEST = 1;
public static final int BUILD_STARTED = 2;
public static final int BUILD_FINISHED = 3;
- /** A {@link StringMessage} bearing the {@code artifactId} of the project whose build just started */
+ /**
+ * A {@link StringMessage} bearing the {@code artifactId} of the project whose build just started.
+ */
public static final int PROJECT_STARTED = 4;
- /** A {@link StringMessage} bearing the {@code artifactId} of the project whose build just finished */
+ /**
+ * A {@link StringMessage} bearing the {@code artifactId} of the project whose build just finished.
+ */
public static final int PROJECT_STOPPED = 5;
public static final int MOJO_STARTED = 6;
diff --git a/common/src/main/java/org/mvndaemon/mvnd/common/OptionType.java b/common/src/main/java/org/mvndaemon/mvnd/common/OptionType.java
index 717f0587..817ab91d 100644
--- a/common/src/main/java/org/mvndaemon/mvnd/common/OptionType.java
+++ b/common/src/main/java/org/mvndaemon/mvnd/common/OptionType.java
@@ -46,18 +46,18 @@ public enum OptionType {
return TimeUtils.printDuration(TimeUtils.toMilliSeconds(value));
}
},
- /** A whole number */
+ /** A whole number. */
INTEGER,
/**
* An amount of memory as accepted by the <code>-Xm*</code> family of HotSpot JVM options. Examples:
* <code>1024m</code>, <code>2g</code>, <code>5G</code>
*/
MEMORY_SIZE,
- /** A local file system path */
+ /** A local file system path. */
PATH,
- /** A string */
+ /** A string. */
STRING,
- /** No value */
+ /** No value. */
VOID;
public String normalize(String value) {
diff --git a/common/src/main/java/org/mvndaemon/mvnd/common/OsUtils.java b/common/src/main/java/org/mvndaemon/mvnd/common/OsUtils.java
index 910ffae5..8e9b21ee 100644
--- a/common/src/main/java/org/mvndaemon/mvnd/common/OsUtils.java
+++ b/common/src/main/java/org/mvndaemon/mvnd/common/OsUtils.java
@@ -193,7 +193,7 @@ public class OsUtils {
}
/**
- * Simple CSV line parser that handles quoted fields
+ * Simple CSV line parser that handles quoted fields.
*/
private static String[] parseCsvLine(String line) {
List<String> fields = new ArrayList<>();
@@ -220,9 +220,9 @@ public class OsUtils {
* Executes the given {@code javaExecutable} with {@code -XshowSettings:properties -version} parameters and extracts
* the value of {@code java.home} from the output.
*
- * @param javaExecutable pass {@code "java"} to get {@code java} binary available in {@code PATH} environment
+ * @param javaExecutable pass {@code "java"} to get {@code java} binary available in {@code PATH} environment
* variable or pass an absolute path to a {@code "java"} executable
- * @return a {@code java.home} value or null
+ * @return a {@code java.home} value or null
*/
public static String findJavaHomeFromJavaExecutable(String javaExecutable) {
String[] cmd = {javaExecutable, "-XshowSettings:properties", "-version"};
diff --git a/common/src/main/java/org/mvndaemon/mvnd/common/SignalHelper.java b/common/src/main/java/org/mvndaemon/mvnd/common/SignalHelper.java
index bf9ce527..9b51bf3c 100644
--- a/common/src/main/java/org/mvndaemon/mvnd/common/SignalHelper.java
+++ b/common/src/main/java/org/mvndaemon/mvnd/common/SignalHelper.java
@@ -21,7 +21,7 @@ package org.mvndaemon.mvnd.common;
public class SignalHelper {
/**
- * Ignore signals to that stopping the mvnd client won't stop the daemon
+ * Ignore signals to that stopping the mvnd client won't stop the daemon.
*/
public static void ignoreStopSignals() throws Exception {
sun.misc.Signal.handle(new sun.misc.Signal("INT"), sun.misc.SignalHandler.SIG_IGN);
diff --git a/common/src/main/java/org/mvndaemon/mvnd/common/TimeUtils.java b/common/src/main/java/org/mvndaemon/mvnd/common/TimeUtils.java
index 8d676aea..6402945b 100644
--- a/common/src/main/java/org/mvndaemon/mvnd/common/TimeUtils.java
+++ b/common/src/main/java/org/mvndaemon/mvnd/common/TimeUtils.java
@@ -61,10 +61,10 @@ public final class TimeUtils {
* 500 -> 500ms
* 1300 -> 1s300ms
* 310300 -> 5m10s300ms
- * 6600000 -> 1h50m
+ * 6600000 -> 1h50m.
*
- * @param millis time in milliseconds
- * @return time in string
+ * @param millis time in milliseconds
+ * @return time in string
*/
public static String printDuration(long millis) {
if (millis < 0) {
diff --git a/common/src/main/java/org/mvndaemon/mvnd/common/logging/TerminalInputHandler.java b/common/src/main/java/org/mvndaemon/mvnd/common/logging/TerminalInputHandler.java
index c4071cbe..e01d92c6 100644
--- a/common/src/main/java/org/mvndaemon/mvnd/common/logging/TerminalInputHandler.java
+++ b/common/src/main/java/org/mvndaemon/mvnd/common/logging/TerminalInputHandler.java
@@ -50,7 +50,7 @@ import org.mvndaemon.mvnd.common.Message;
*
* Input handling differs based on terminal type:
* - Normal terminals: Handle all input types including control keys
- * - Dumb terminals: Only handle project input and prompts, ignore control keys
+ * - Dumb terminals: Only handle project input and prompts, ignore control keys.
*/
public class TerminalInputHandler implements AutoCloseable {
private final Terminal terminal;
diff --git a/common/src/main/java/org/mvndaemon/mvnd/common/logging/TerminalOutput.java b/common/src/main/java/org/mvndaemon/mvnd/common/logging/TerminalOutput.java
index ea416498..65049f5f 100644
--- a/common/src/main/java/org/mvndaemon/mvnd/common/logging/TerminalOutput.java
+++ b/common/src/main/java/org/mvndaemon/mvnd/common/logging/TerminalOutput.java
@@ -104,9 +104,9 @@ public class TerminalOutput implements ClientOutput {
private final boolean dumb;
private final TerminalInputHandler inputHandler;
- /** A sink for sending messages back to the daemon */
+ /** A sink for sending messages back to the daemon. */
private volatile Consumer<Message> daemonDispatch;
- /** A sink for queuing messages to the main queue */
+ /** A sink for queuing messages to the main queue. */
private volatile Consumer<Message> daemonReceive;
/*
@@ -119,12 +119,14 @@ public class TerminalOutput implements ClientOutput {
private String name;
private String daemonId;
private int totalProjects;
- /** String format for formatting the number of projects done with padding based on {@link #totalProjects} */
+ /**
+ * String format for formatting the number of projects done with padding based on {@link #totalProjects}
+ */
private String projectsDoneFomat;
private int maxThreads;
private String artifactIdFormat;
- /** String format for formatting the actual/hidden/max thread counts */
+ /** String format for formatting the actual/hidden/max thread counts. */
private String threadsFormat;
private int linesPerProject = 0;
diff --git a/daemon/src/main/java/org/apache/maven/cli/CommonsCliDaemonMavenOptions.java b/daemon/src/main/java/org/apache/maven/cli/CommonsCliDaemonMavenOptions.java
index a846fab5..cabd851b 100644
--- a/daemon/src/main/java/org/apache/maven/cli/CommonsCliDaemonMavenOptions.java
+++ b/daemon/src/main/java/org/apache/maven/cli/CommonsCliDaemonMavenOptions.java
@@ -187,8 +187,8 @@ public class CommonsCliDaemonMavenOptions extends CommonsCliMavenOptions {
/**
* Append {@code count} spaces to the given {@code stringBuilder}
*
- * @param stringBuilder the {@link StringBuilder} to append to
- * @param count the number of spaces to append
+ * @param stringBuilder the {@link StringBuilder} to append to
+ * @param count the number of spaces to append
*/
static void spaces(StringBuilder stringBuilder, int count) {
stringBuilder.append(" ".repeat(Math.max(0, count)));
diff --git a/daemon/src/main/java/org/apache/maven/cli/DaemonCli.java b/daemon/src/main/java/org/apache/maven/cli/DaemonCli.java
index 07637b8d..62c5e41d 100644
--- a/daemon/src/main/java/org/apache/maven/cli/DaemonCli.java
+++ b/daemon/src/main/java/org/apache/maven/cli/DaemonCli.java
@@ -26,7 +26,7 @@ import java.util.Map;
import org.apache.maven.logging.BuildEventListener;
/**
- * Simple interface to bridge maven 3.9.x and 4.0.x CLI
+ * Simple interface to bridge maven 3.9.x and 4.0.x CLI.
*/
public interface DaemonCli extends AutoCloseable {
int main(
diff --git a/daemon/src/main/java/org/mvndaemon/mvnd/cache/Cache.java b/daemon/src/main/java/org/mvndaemon/mvnd/cache/Cache.java
index dc167ac7..9a8d24b3 100644
--- a/daemon/src/main/java/org/mvndaemon/mvnd/cache/Cache.java
+++ b/daemon/src/main/java/org/mvndaemon/mvnd/cache/Cache.java
@@ -33,15 +33,15 @@ import java.util.function.Function;
public interface Cache<K, V extends CacheRecord> {
/**
- * Check if the cache contains the given key
+ * Check if the cache contains the given key.
*/
boolean contains(K key);
/**
- * Get the cached record for the key
+ * Get the cached record for the key.
*
- * @param key the key to search for
- * @return the {@link CacheRecord} associated with the given {@code key}
+ * @param key the key to search for
+ * @return the {@link CacheRecord} associated with the given {@code key}
*/
V get(K key);
@@ -54,22 +54,22 @@ public interface Cache<K, V extends CacheRecord> {
void put(K key, V value);
/**
- * Remove all cached records
+ * Remove all cached records.
*/
void clear();
/**
- * Remove all records satisfying the given predicate
+ * Remove all records satisfying the given predicate.
*/
void removeIf(BiPredicate<K, V> predicate);
/**
* Get or compute the cached value if absent and return it.
*
- * @param key the key to search for
- * @param mappingFunction the function to use for the computation of the new {@link CacheRecord} if the key is not
+ * @param key the key to search for
+ * @param mappingFunction the function to use for the computation of the new {@link CacheRecord} if the key is not
* available in this {@link Cache} yet
- * @return the existing or newly computed {@link CacheRecord}
+ * @return the existing or newly computed {@link CacheRecord}
*/
V computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction);
}
diff --git a/daemon/src/main/java/org/mvndaemon/mvnd/cache/CacheFactory.java b/daemon/src/main/java/org/mvndaemon/mvnd/cache/CacheFactory.java
index 38c3b266..ea4a954f 100644
--- a/daemon/src/main/java/org/mvndaemon/mvnd/cache/CacheFactory.java
+++ b/daemon/src/main/java/org/mvndaemon/mvnd/cache/CacheFactory.java
@@ -19,14 +19,14 @@
package org.mvndaemon.mvnd.cache;
/**
- * A factory for cache objects
+ * A factory for cache objects.
*/
public interface CacheFactory {
/**
- * @param <K> the type of {@link Cache} keys
- * @param <V> the type of {@link Cache} values
- * @return a new {@link Cache}
+ * @param <K> the type of {@link Cache} keys
+ * @param <V> the type of {@link Cache} values
+ * @return a new {@link Cache}
*/
<K, V extends CacheRecord> Cache<K, V> newCache();
}
diff --git a/daemon/src/main/java/org/mvndaemon/mvnd/cache/CacheRecord.java b/daemon/src/main/java/org/mvndaemon/mvnd/cache/CacheRecord.java
index 99fa9a5d..4bf9be31 100644
--- a/daemon/src/main/java/org/mvndaemon/mvnd/cache/CacheRecord.java
+++ b/daemon/src/main/java/org/mvndaemon/mvnd/cache/CacheRecord.java
@@ -28,7 +28,7 @@ public interface CacheRecord {
/**
* @return a {@link Stream} of file (not directory) {@link Path}s whose modification or deletion causes invalidation
- * of this {@link CacheRecord}.
+ * of this {@link CacheRecord}
*/
Stream<Path> getDependencyPaths();
diff --git a/daemon/src/main/java/org/mvndaemon/mvnd/cache/impl/TimestampCacheFactory.java b/daemon/src/main/java/org/mvndaemon/mvnd/cache/impl/TimestampCacheFactory.java
index 0bb752f0..7863c2b6 100644
--- a/daemon/src/main/java/org/mvndaemon/mvnd/cache/impl/TimestampCacheFactory.java
+++ b/daemon/src/main/java/org/mvndaemon/mvnd/cache/impl/TimestampCacheFactory.java
@@ -98,7 +98,9 @@ public class TimestampCacheFactory implements CacheFactory {
static class Record<V extends CacheRecord> {
final V record;
- /** {@link Set} of {@link FileState}s at the creation time of this {@link Record} */
+ /**
+ * {@link Set} of {@link FileState}s at the creation time of this {@link Record}
+ */
final Set<FileState> fileStates;
public Record(V record) {
diff --git a/daemon/src/main/java/org/mvndaemon/mvnd/daemon/DaemonExpiration.java b/daemon/src/main/java/org/mvndaemon/mvnd/daemon/DaemonExpiration.java
index 87e70b8f..29f6e98a 100644
--- a/daemon/src/main/java/org/mvndaemon/mvnd/daemon/DaemonExpiration.java
+++ b/daemon/src/main/java/org/mvndaemon/mvnd/daemon/DaemonExpiration.java
@@ -53,7 +53,7 @@ import static org.mvndaemon.mvnd.daemon.DaemonExpiration.DaemonExpirationResult.
/**
* File origin:
- * https://github.com/gradle/gradle/blob/v5.6.2/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/server/MasterExpirationStrategy.java
+ * https://github.com/gradle/gradle/blob/v5.6.2/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/server/MasterExpirationStrategy.java.
*/
public class DaemonExpiration {
diff --git a/daemon/src/main/java/org/mvndaemon/mvnd/daemon/DaemonInputStream.java b/daemon/src/main/java/org/mvndaemon/mvnd/daemon/DaemonInputStream.java
index 6843a910..3d266a3f 100644
--- a/daemon/src/main/java/org/mvndaemon/mvnd/daemon/DaemonInputStream.java
+++ b/daemon/src/main/java/org/mvndaemon/mvnd/daemon/DaemonInputStream.java
@@ -56,7 +56,7 @@ import org.apache.maven.logging.ProjectBuildLogAppender;
* This implementation is particularly important for:
* 1. Handling piped input (e.g., cat file | mvnd ...)
* 2. Supporting interactive input during builds
- * 3. Managing input across multiple project builds
+ * 3. Managing input across multiple project builds.
*/
class DaemonInputStream extends InputStream {
private final BiConsumer<String, Integer> startReadingFromProject;
diff --git a/native/src/main/java/org/mvndaemon/mvnd/nativ/CLibrary.java b/native/src/main/java/org/mvndaemon/mvnd/nativ/CLibrary.java
index 98d9d003..11a53e2c 100644
--- a/native/src/main/java/org/mvndaemon/mvnd/nativ/CLibrary.java
+++ b/native/src/main/java/org/mvndaemon/mvnd/nativ/CLibrary.java
@@ -24,7 +24,7 @@ package org.mvndaemon.mvnd.nativ;
* as <code>jansi</code> library.
*
* @author <a href="http://hiramchirino.com">Hiram Chirino</a>
- * @see MvndNativeLoader
+ * @see MvndNativeLoader
*/
@SuppressWarnings("unused")
public class CLibrary {
diff --git a/native/src/main/java/org/mvndaemon/mvnd/nativ/MvndNativeLoader.java b/native/src/main/java/org/mvndaemon/mvnd/nativ/MvndNativeLoader.java
index cdfae9d0..f5b0ead9 100644
--- a/native/src/main/java/org/mvndaemon/mvnd/nativ/MvndNativeLoader.java
+++ b/native/src/main/java/org/mvndaemon/mvnd/nativ/MvndNativeLoader.java
@@ -51,8 +51,8 @@ public class MvndNativeLoader {
/**
* Loads mvndnative native library.
*
- * @return True if mvndnative native library is successfully loaded; false
- * otherwise.
+ * @return true if mvndnative native library is successfully loaded; false
+ * otherwise
*/
public static synchronized boolean initialize() {
// only cleanup before the first extract
@@ -151,11 +151,11 @@ public class MvndNativeLoader {
}
/**
- * Extracts and loads the specified library file to the target folder
+ * Extracts and loads the specified library file to the target folder.
*
- * @param libFolderForCurrentOS Library path.
- * @param libraryFileName Library name.
- * @param targetFolder Target folder.
+ * @param libFolderForCurrentOS Library path
+ * @param libraryFileName Library name
+ * @param targetFolder Target folder
* @return
*/
private static boolean extractAndLoadLibraryFile(
@@ -229,8 +229,8 @@ public class MvndNativeLoader {
/**
* Loads native library using the given path and name of the library.
*
- * @param libPath Path of the native library.
- * @return True for successfully loading; false otherwise.
+ * @param libPath Path of the native library
+ * @return True for successfully loading; false otherwise
*/
private static boolean loadNativeLibrary(File libPath) {
if (libPath.exists()) {
@@ -333,7 +333,7 @@ public class MvndNativeLoader {
}
/**
- * @return The major version of the mvndnative library.
+ * @return the major version of the mvndnative library
*/
public static int getMajorVersion() {
String[] c = getVersion().split("\\.");
@@ -341,7 +341,7 @@ public class MvndNativeLoader {
}
/**
- * @return The minor version of the mvndnative library.
+ * @return the minor version of the mvndnative library
*/
public static int getMinorVersion() {
String[] c = getVersion().split("\\.");
@@ -349,7 +349,7 @@ public class MvndNativeLoader {
}
/**
- * @return The version of the mvndnative library.
+ * @return the version of the mvndnative library
*/
public static String getVersion() {