You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by tw...@apache.org on 2025/10/19 10:07:25 UTC
(mina-sshd) 05/09: Fix Javadoc problems
This is an automated email from the ASF dual-hosted git repository.
twolf pushed a commit to branch dev_3.0
in repository https://gitbox.apache.org/repos/asf/mina-sshd.git
commit bf606d26d1810c0ca7783a8d689a5488617da813
Author: Thomas Wolf <tw...@apache.org>
AuthorDate: Sun Oct 19 00:50:48 2025 +0200
Fix Javadoc problems
---
.../sshd/common/config/keys/BuiltinIdentities.java | 1 -
.../org/apache/sshd/common/config/keys/KeyUtils.java | 18 +++++++++---------
.../common/config/keys/PrivateKeyEntryDecoder.java | 4 +---
.../common/config/keys/PublicKeyRawDataDecoder.java | 3 +--
.../keys/impl/AbstractIdentityResourceLoader.java | 4 +---
.../config/keys/impl/AbstractKeyEntryResolver.java | 4 +---
.../keys/impl/AbstractPublicKeyEntryDecoder.java | 8 ++------
.../loader/openssh/OpenSSHKeyPairResourceParser.java | 1 -
.../org/apache/sshd/common/channel/LocalWindow.java | 2 +-
.../org/apache/sshd/common/channel/RemoteWindow.java | 2 +-
.../org/apache/sshd/core/CoreModuleProperties.java | 2 +-
.../org/apache/sshd/putty/AbstractPuttyKeyDecoder.java | 4 +---
.../apache/sshd/putty/PuttyKeyPairResourceParser.java | 2 --
13 files changed, 19 insertions(+), 36 deletions(-)
diff --git a/sshd-common/src/main/java/org/apache/sshd/common/config/keys/BuiltinIdentities.java b/sshd-common/src/main/java/org/apache/sshd/common/config/keys/BuiltinIdentities.java
index a43b9737b..871c09ecd 100644
--- a/sshd-common/src/main/java/org/apache/sshd/common/config/keys/BuiltinIdentities.java
+++ b/sshd-common/src/main/java/org/apache/sshd/common/config/keys/BuiltinIdentities.java
@@ -148,7 +148,6 @@ public enum BuiltinIdentities implements Identity {
* @param key The {@link Key} instance - ignored if {@code null}
* @return The matching {@link BuiltinIdentities} whose either public or private key type matches the requested
* one or {@code null} if no match found
- * @see #fromKeyType(Class)
*/
public static BuiltinIdentities fromKey(Key key) {
if (key == null) {
diff --git a/sshd-common/src/main/java/org/apache/sshd/common/config/keys/KeyUtils.java b/sshd-common/src/main/java/org/apache/sshd/common/config/keys/KeyUtils.java
index b05ec3b8d..0cf91fa8a 100644
--- a/sshd-common/src/main/java/org/apache/sshd/common/config/keys/KeyUtils.java
+++ b/sshd-common/src/main/java/org/apache/sshd/common/config/keys/KeyUtils.java
@@ -341,7 +341,7 @@ public final class KeyUtils {
* @return A {@link KeyPair} of the specified type and size
* @throws GeneralSecurityException If failed to generate the key pair
* @see #getPublicKeyEntryDecoder(String)
- * @see PublicKeyEntryDecoder<?, ?>#generateKeyPair(int)
+ * @see PublicKeyEntryDecoder#generateKeyPair(int)
*/
public static KeyPair generateKeyPair(String keyType, int keySize) throws GeneralSecurityException {
PublicKeyEntryDecoder decoder = getPublicKeyEntryDecoder(keyType);
@@ -353,7 +353,7 @@ public final class KeyUtils {
}
/**
- * Registers the specified decoder for all the types it {@link PublicKeyEntryDecoder<?, ?>#getSupportedKeyTypes()
+ * Registers the specified decoder for all the types it {@link PublicKeyEntryDecoder#getSupportedKeyTypes()
* supports}
*
* @param decoder The (never {@code null}) {@link PublicKeyEntryDecoder decoder} to register
@@ -371,9 +371,9 @@ public final class KeyUtils {
/**
* Unregisters the specified decoder for all the types it supports
*
- * @param decoder The (never {@code null}) {@link PublicKeyEntryDecoder<?, ?> decoder} to unregister
+ * @param decoder The (never {@code null}) {@link PublicKeyEntryDecoder decoder} to unregister
* @return {@link Set} of all the effectively un-registered key types out of all the
- * {@link PublicKeyEntryDecoder<?, ?>#getSupportedKeyTypes() supported} ones.
+ * {@link PublicKeyEntryDecoder#getSupportedKeyTypes() supported} ones.
* @see #unregisterPublicKeyEntryDecoderForKeyType(String)
*/
public static Set<String> unregisterPublicKeyEntryDecoder(PublicKeyEntryDecoder decoder) {
@@ -395,8 +395,8 @@ public final class KeyUtils {
* Unregister the decoder registered for the specified key type
*
* @param keyType The key (never {@code null}/empty) key type
- * @return The unregistered {@link PublicKeyEntryDecoder<?, ?>} - {@code null} if none registered for this
- * key type
+ * @return The unregistered {@link PublicKeyEntryDecoder} - {@code null} if none registered for this key
+ * type
*/
public static PublicKeyEntryDecoder unregisterPublicKeyEntryDecoderForKeyType(String keyType) {
keyType = ValidateUtils.checkNotNullAndNotEmpty(keyType, "No key type specified");
@@ -406,7 +406,7 @@ public final class KeyUtils {
/**
* @param keyType The {@code OpenSSH} key type string - e.g., {@code ssh-rsa, ssh-dss} - ignored if
* {@code null}/empty
- * @return The registered {@link PublicKeyEntryDecoder<?, ?>} or {code null} if not found
+ * @return The registered {@link PublicKeyEntryDecoder} or {code null} if not found
*/
public static PublicKeyEntryDecoder getPublicKeyEntryDecoder(String keyType) {
if (GenericUtils.isEmpty(keyType)) {
@@ -417,8 +417,8 @@ public final class KeyUtils {
/**
* @param kp The {@link KeyPair} to examine - ignored if {@code null}
- * @return The matching {@link PublicKeyEntryDecoder<?, ?>} provided <U>both</U> the public and private keys have
- * the same decoder - {@code null} if no match found
+ * @return The matching {@link PublicKeyEntryDecoder} provided <U>both</U> the public and private keys have the
+ * same decoder - {@code null} if no match found
* @see #getPublicKeyEntryDecoder(Key)
*/
public static PublicKeyEntryDecoder getPublicKeyEntryDecoder(KeyPair kp) {
diff --git a/sshd-common/src/main/java/org/apache/sshd/common/config/keys/PrivateKeyEntryDecoder.java b/sshd-common/src/main/java/org/apache/sshd/common/config/keys/PrivateKeyEntryDecoder.java
index 3d5571323..ab76ccabb 100644
--- a/sshd-common/src/main/java/org/apache/sshd/common/config/keys/PrivateKeyEntryDecoder.java
+++ b/sshd-common/src/main/java/org/apache/sshd/common/config/keys/PrivateKeyEntryDecoder.java
@@ -38,9 +38,7 @@ import org.apache.sshd.common.util.ValidateUtils;
import org.apache.sshd.common.util.io.output.SecureByteArrayOutputStream;
/**
- * @param <PUB> Type of {@link PublicKey}
- * @param <PRV> Type of {@link PrivateKey}
- * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
+ * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
*/
public interface PrivateKeyEntryDecoder extends KeyEntryResolver, PrivateKeyEntryResolver {
diff --git a/sshd-common/src/main/java/org/apache/sshd/common/config/keys/PublicKeyRawDataDecoder.java b/sshd-common/src/main/java/org/apache/sshd/common/config/keys/PublicKeyRawDataDecoder.java
index 345b086b4..f796250bb 100644
--- a/sshd-common/src/main/java/org/apache/sshd/common/config/keys/PublicKeyRawDataDecoder.java
+++ b/sshd-common/src/main/java/org/apache/sshd/common/config/keys/PublicKeyRawDataDecoder.java
@@ -30,8 +30,7 @@ import org.apache.sshd.common.session.SessionContext;
import org.apache.sshd.common.util.NumberUtils;
/**
- * @param <PUB> Generic {@link PublicKey} type
- * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
+ * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
*/
public interface PublicKeyRawDataDecoder {
/**
diff --git a/sshd-common/src/main/java/org/apache/sshd/common/config/keys/impl/AbstractIdentityResourceLoader.java b/sshd-common/src/main/java/org/apache/sshd/common/config/keys/impl/AbstractIdentityResourceLoader.java
index 5207f97c4..d0e2856f4 100644
--- a/sshd-common/src/main/java/org/apache/sshd/common/config/keys/impl/AbstractIdentityResourceLoader.java
+++ b/sshd-common/src/main/java/org/apache/sshd/common/config/keys/impl/AbstractIdentityResourceLoader.java
@@ -28,9 +28,7 @@ import org.apache.sshd.common.util.ValidateUtils;
import org.apache.sshd.common.util.logging.AbstractLoggingBean;
/**
- * @param <PUB> Generic public key type
- * @param <PRV> Generic private key type
- * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
+ * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
*/
public abstract class AbstractIdentityResourceLoader
extends AbstractLoggingBean
diff --git a/sshd-common/src/main/java/org/apache/sshd/common/config/keys/impl/AbstractKeyEntryResolver.java b/sshd-common/src/main/java/org/apache/sshd/common/config/keys/impl/AbstractKeyEntryResolver.java
index 7d14e6b8b..11ebe01ff 100644
--- a/sshd-common/src/main/java/org/apache/sshd/common/config/keys/impl/AbstractKeyEntryResolver.java
+++ b/sshd-common/src/main/java/org/apache/sshd/common/config/keys/impl/AbstractKeyEntryResolver.java
@@ -29,9 +29,7 @@ import java.util.Collection;
import org.apache.sshd.common.config.keys.KeyEntryResolver;
/**
- * @param <PUB> Type of {@link PublicKey}
- * @param <PRV> Type of {@link PrivateKey}
- * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
+ * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
*/
public abstract class AbstractKeyEntryResolver extends AbstractIdentityResourceLoader implements KeyEntryResolver {
protected AbstractKeyEntryResolver(Collection<String> names) {
diff --git a/sshd-common/src/main/java/org/apache/sshd/common/config/keys/impl/AbstractPublicKeyEntryDecoder.java b/sshd-common/src/main/java/org/apache/sshd/common/config/keys/impl/AbstractPublicKeyEntryDecoder.java
index cf9cde054..efdc9da06 100644
--- a/sshd-common/src/main/java/org/apache/sshd/common/config/keys/impl/AbstractPublicKeyEntryDecoder.java
+++ b/sshd-common/src/main/java/org/apache/sshd/common/config/keys/impl/AbstractPublicKeyEntryDecoder.java
@@ -19,8 +19,6 @@
package org.apache.sshd.common.config.keys.impl;
-import java.security.PrivateKey;
-import java.security.PublicKey;
import java.util.Collection;
import java.util.Map;
@@ -29,11 +27,9 @@ import org.apache.sshd.common.config.keys.PublicKeyEntryDecoder;
import org.apache.sshd.common.util.MapEntryUtils;
/**
- * Useful base class implementation for a decoder of an {@code OpenSSH} encoded key data
+ * Useful base class implementation for a decoder of an {@code OpenSSH} encoded key data.
*
- * @param <PUB> Type of {@link PublicKey}
- * @param <PRV> Type of {@link PrivateKey}
- * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
+ * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
*/
public abstract class AbstractPublicKeyEntryDecoder extends AbstractKeyEntryResolver implements PublicKeyEntryDecoder {
protected AbstractPublicKeyEntryDecoder(Collection<String> names) {
diff --git a/sshd-common/src/main/java/org/apache/sshd/common/config/keys/loader/openssh/OpenSSHKeyPairResourceParser.java b/sshd-common/src/main/java/org/apache/sshd/common/config/keys/loader/openssh/OpenSSHKeyPairResourceParser.java
index 5c2f77811..c9fc76f6a 100644
--- a/sshd-common/src/main/java/org/apache/sshd/common/config/keys/loader/openssh/OpenSSHKeyPairResourceParser.java
+++ b/sshd-common/src/main/java/org/apache/sshd/common/config/keys/loader/openssh/OpenSSHKeyPairResourceParser.java
@@ -335,7 +335,6 @@ public class OpenSSHKeyPairResourceParser extends AbstractKeyPairResourceParser
/**
* @param decoder The decoder to register
* @throws IllegalArgumentException if no decoder or not key type or no supported names for the decoder
- * @see PrivateKeyEntryDecoder#getPublicKeyType()
* @see PrivateKeyEntryDecoder#getSupportedKeyTypes()
*/
public static void registerPrivateKeyEntryDecoder(PrivateKeyEntryDecoder decoder) {
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/channel/LocalWindow.java b/sshd-core/src/main/java/org/apache/sshd/common/channel/LocalWindow.java
index 10f4a700a..bb2722f46 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/channel/LocalWindow.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/channel/LocalWindow.java
@@ -56,7 +56,7 @@ public class LocalWindow extends Window {
/**
* Initializes the {@link LocalWindow} with the packet and window sizes from the {@code resolver}.
*
- * @param resolver {@PropertyResolver} to access properties
+ * @param resolver {@link PropertyResolver} to access properties
*/
public void init(PropertyResolver resolver) {
init(CoreModuleProperties.WINDOW_SIZE.getRequired(resolver),
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/channel/RemoteWindow.java b/sshd-core/src/main/java/org/apache/sshd/common/channel/RemoteWindow.java
index ca8da5b60..29e4e926b 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/channel/RemoteWindow.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/channel/RemoteWindow.java
@@ -55,7 +55,7 @@ public class RemoteWindow extends Window {
*
* @param size the initial window size
* @param packetSize the peer's advertised maximum packet size
- * @param resolver {@PropertyResolver} to access properties
+ * @param resolver {@link PropertyResolver} to access properties
*/
@Override
public void init(long size, long packetSize, PropertyResolver resolver) {
diff --git a/sshd-core/src/main/java/org/apache/sshd/core/CoreModuleProperties.java b/sshd-core/src/main/java/org/apache/sshd/core/CoreModuleProperties.java
index c777d0dbf..a51c3c740 100644
--- a/sshd-core/src/main/java/org/apache/sshd/core/CoreModuleProperties.java
+++ b/sshd-core/src/main/java/org/apache/sshd/core/CoreModuleProperties.java
@@ -205,7 +205,7 @@ public final class CoreModuleProperties {
= Property.bool("channel-exec-want-reply", false);
/**
- * On some platforms, a call to {@ode System.in.read(new byte[65536], 0, 32768)} always throws an
+ * On some platforms, a call to {@code System.in.read(new byte[65536], 0, 32768)} always throws an
* {@link IOException}. So we need to protect against that and chunk the call into smaller calls. This problem was
* found on Windows, JDK 1.6.0_03-b05.
*/
diff --git a/sshd-putty/src/main/java/org/apache/sshd/putty/AbstractPuttyKeyDecoder.java b/sshd-putty/src/main/java/org/apache/sshd/putty/AbstractPuttyKeyDecoder.java
index e377aec7f..521103826 100644
--- a/sshd-putty/src/main/java/org/apache/sshd/putty/AbstractPuttyKeyDecoder.java
+++ b/sshd-putty/src/main/java/org/apache/sshd/putty/AbstractPuttyKeyDecoder.java
@@ -44,9 +44,7 @@ import org.apache.sshd.common.util.GenericUtils;
import org.apache.sshd.common.util.ValidateUtils;
/**
- * @param <PUB> Generic public key type
- * @param <PRV> Generic private key type
- * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
+ * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
*/
public abstract class AbstractPuttyKeyDecoder extends AbstractIdentityResourceLoader implements PuttyKeyPairResourceParser {
public static final String ENCRYPTION_HEADER = "Encryption";
diff --git a/sshd-putty/src/main/java/org/apache/sshd/putty/PuttyKeyPairResourceParser.java b/sshd-putty/src/main/java/org/apache/sshd/putty/PuttyKeyPairResourceParser.java
index d8bea1d3c..bf83ce189 100644
--- a/sshd-putty/src/main/java/org/apache/sshd/putty/PuttyKeyPairResourceParser.java
+++ b/sshd-putty/src/main/java/org/apache/sshd/putty/PuttyKeyPairResourceParser.java
@@ -91,8 +91,6 @@ import org.bouncycastle.crypto.params.Argon2Parameters;
* Emdk
* Private-MAC: 50c45751d18d74c00fca395deb7b7695e3ed6f77
* </PRE>
- * @param <PUB> Generic public key type
- * @param <PRV> Generic private key type
* @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
*/
//CHECKSTYLE:ON