This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-codec.git
commit 2bb4fd9c5744c0f34230b4909018524457d331dd Author: Gary Gregory <[email protected]> AuthorDate: Wed Dec 31 10:03:37 2025 -0500 Javadoc --- .../org/apache/commons/codec/binary/BaseNCodec.java | 2 +- .../java/org/apache/commons/codec/digest/Crypt.java | 8 ++++---- .../org/apache/commons/codec/digest/DigestUtils.java | 20 ++++++++++---------- .../org/apache/commons/codec/digest/HmacUtils.java | 2 +- .../org/apache/commons/codec/digest/Md5Crypt.java | 6 +++--- .../org/apache/commons/codec/digest/MurmurHash.java | 4 ++-- .../org/apache/commons/codec/digest/MurmurHash2.java | 10 +++++----- .../org/apache/commons/codec/digest/Sha2Crypt.java | 2 +- .../codec/language/bm/BeiderMorseEncoder.java | 2 +- .../commons/codec/language/bm/PhoneticEngine.java | 14 +++++++------- .../org/apache/commons/codec/language/bm/Rule.java | 12 ++++++------ .../java/org/apache/commons/codec/net/QCodec.java | 4 ++-- .../java/org/apache/commons/codec/net/URLCodec.java | 4 ++-- 13 files changed, 45 insertions(+), 45 deletions(-) diff --git a/src/main/java/org/apache/commons/codec/binary/BaseNCodec.java b/src/main/java/org/apache/commons/codec/binary/BaseNCodec.java index 34d24570..cddefa53 100644 --- a/src/main/java/org/apache/commons/codec/binary/BaseNCodec.java +++ b/src/main/java/org/apache/commons/codec/binary/BaseNCodec.java @@ -415,7 +415,7 @@ public abstract class BaseNCodec implements BinaryEncoder, BinaryDecoder { * Increases our buffer by the {@link #DEFAULT_BUFFER_RESIZE_FACTOR}. * * @param context the context to be used. - * @param minCapacity the minimum required capacity + * @param minCapacity the minimum required capacity. * @return the resized byte[] buffer. * @throws OutOfMemoryError if the {@code minCapacity} is negative. */ diff --git a/src/main/java/org/apache/commons/codec/digest/Crypt.java b/src/main/java/org/apache/commons/codec/digest/Crypt.java index 8d24ffc2..15599c1f 100644 --- a/src/main/java/org/apache/commons/codec/digest/Crypt.java +++ b/src/main/java/org/apache/commons/codec/digest/Crypt.java @@ -64,7 +64,7 @@ public class Crypt { * @param salt * the salt, which is used to select the algorithm, see {@link #crypt(String, String)} * The salt may be null, - * in which case the method delegates to {@link Sha2Crypt#sha512Crypt(byte[])} + * in which case the method delegates to {@link Sha2Crypt#sha512Crypt(byte[])}. * * @return hash value. * @throws IllegalArgumentException @@ -162,12 +162,12 @@ public class Crypt { * plaintext password as entered by the used. * @param salt * real salt value without prefix or "rounds=". The salt may be null, in which case a - * salt is generated for you using {@link SecureRandom} - * @return hash value, i.e. encrypted password including the salt string + * salt is generated for you using {@link SecureRandom}. + * @return hash value, i.e. encrypted password including the salt string. * @throws IllegalArgumentException * if the salt does not match the allowed pattern. * @throws IllegalArgumentException - * when a {@link java.security.NoSuchAlgorithmException} is caught. * + * when a {@link java.security.NoSuchAlgorithmException} is caught. */ public static String crypt(final String key, final String salt) { return crypt(key.getBytes(StandardCharsets.UTF_8), salt); diff --git a/src/main/java/org/apache/commons/codec/digest/DigestUtils.java b/src/main/java/org/apache/commons/codec/digest/DigestUtils.java index e3175afb..36a258bc 100644 --- a/src/main/java/org/apache/commons/codec/digest/DigestUtils.java +++ b/src/main/java/org/apache/commons/codec/digest/DigestUtils.java @@ -1414,7 +1414,7 @@ public class DigestUtils { * Updates the given {@link MessageDigest}. * * @param messageDigest the {@link MessageDigest} to update. - * @param valueToDigest the value to update the {@link MessageDigest} with + * @param valueToDigest the value to update the {@link MessageDigest} with. * @return the updated {@link MessageDigest}. * @since 1.7 */ @@ -1427,7 +1427,7 @@ public class DigestUtils { * Updates the given {@link MessageDigest}. * * @param messageDigest the {@link MessageDigest} to update. - * @param valueToDigest the value to update the {@link MessageDigest} with + * @param valueToDigest the value to update the {@link MessageDigest} with. * @return the updated {@link MessageDigest}. * @since 1.11 */ @@ -1440,7 +1440,7 @@ public class DigestUtils { * Reads through a File and updates the digest for the data * * @param digest The MessageDigest to use (for example MD5). - * @param data Data to digest + * @param data Data to digest. * @return the digest. * @throws IOException On error reading from the stream. * @since 1.11 @@ -1455,7 +1455,7 @@ public class DigestUtils { * TODO Decide if this should be public. * * @param digest The MessageDigest to use (for example MD5). - * @param data Data to digest + * @param data Data to digest. * @return the digest. * @throws IOException On error reading from the stream. * @since 1.14 @@ -1474,7 +1474,7 @@ public class DigestUtils { * Reads through an InputStream and updates the digest for the data * * @param digest The MessageDigest to use (for example MD5). - * @param inputStream Data to digest + * @param inputStream Data to digest. * @return the digest. * @throws IOException On error reading from the stream. * @since 1.8 @@ -1493,7 +1493,7 @@ public class DigestUtils { * Reads through a Path and updates the digest for the data * * @param digest The MessageDigest to use (for example MD5). - * @param path Data to digest + * @param path Data to digest. * @param options options How to open the file. * @return the digest. * @throws IOException On error reading from the stream. @@ -1509,7 +1509,7 @@ public class DigestUtils { * Reads through a RandomAccessFile and updates the digest for the data using non-blocking-io (NIO) * * @param digest The MessageDigest to use (for example MD5). - * @param data Data to digest + * @param data Data to digest. * @return the digest. * @throws IOException On error reading from the stream. * @since 1.14 @@ -1526,7 +1526,7 @@ public class DigestUtils { * {@link String#getBytes(java.nio.charset.Charset)} and pass that to the {@link DigestUtils#updateDigest(MessageDigest, byte[])} method * * @param messageDigest the {@link MessageDigest} to update. - * @param valueToDigest the value to update the {@link MessageDigest} with; converted to bytes using {@link StringUtils#getBytesUtf8(String)} + * @param valueToDigest the value to update the {@link MessageDigest} with; converted to bytes using {@link StringUtils#getBytesUtf8(String)}. * @return the updated {@link MessageDigest}. * @since 1.7 */ @@ -1623,7 +1623,7 @@ public class DigestUtils { * Reads through a File and returns the digest for the data * * @param data Data to digest. - * @param options options How to open the file + * @param options options How to open the file. * @return the digest. * @throws IOException On error reading from the stream. * @since 1.14 @@ -1693,7 +1693,7 @@ public class DigestUtils { * Reads through a File and returns the digest for the data * * @param data Data to digest. - * @param options options How to open the file + * @param options options How to open the file. * @return the digest as a hexadecimal string. * @throws IOException On error reading from the stream. * @since 1.11 diff --git a/src/main/java/org/apache/commons/codec/digest/HmacUtils.java b/src/main/java/org/apache/commons/codec/digest/HmacUtils.java index 94f27124..b3bd66ee 100644 --- a/src/main/java/org/apache/commons/codec/digest/HmacUtils.java +++ b/src/main/java/org/apache/commons/codec/digest/HmacUtils.java @@ -304,7 +304,7 @@ public final class HmacUtils { * @param key The key for the keyed digest (must not be null). * @param valueToDigest The value (data) which should to digest * <p> - * The InputStream must not be null and will not be closed + * The InputStream must not be null and will not be closed. * </p> * @return HmacSHA1 MAC for the given key and value. * @throws IOException If an I/O error occurs. diff --git a/src/main/java/org/apache/commons/codec/digest/Md5Crypt.java b/src/main/java/org/apache/commons/codec/digest/Md5Crypt.java index 49d36490..82b16707 100644 --- a/src/main/java/org/apache/commons/codec/digest/Md5Crypt.java +++ b/src/main/java/org/apache/commons/codec/digest/Md5Crypt.java @@ -73,7 +73,7 @@ public class Md5Crypt { * * @param keyBytes plaintext string to hash. Each array element is set to {@code 0} before returning. * @return the hash value. - * @throws IllegalArgumentException when a {@link java.security.NoSuchAlgorithmException} is caught. * + * @throws IllegalArgumentException when a {@link java.security.NoSuchAlgorithmException} is caught. * @see #apr1Crypt(byte[], String) */ public static String apr1Crypt(final byte[] keyBytes) { @@ -90,7 +90,7 @@ public class Md5Crypt { * @param random the instance of {@link Random} to use for generating the salt. * Consider using {@link SecureRandom} for more secure salts. * @return the hash value. - * @throws IllegalArgumentException when a {@link java.security.NoSuchAlgorithmException} is caught. * + * @throws IllegalArgumentException when a {@link java.security.NoSuchAlgorithmException} is caught. * @see #apr1Crypt(byte[], String) * @since 1.12 */ @@ -108,7 +108,7 @@ public class Md5Crypt { * plaintext string to hash. Each array element is set to {@code 0} before returning. * @param salt * An APR1 salt. The salt may be null, in which case a salt is generated for you using - * {@link SecureRandom} + * {@link SecureRandom}. * @return the hash value. * @throws IllegalArgumentException * if the salt does not match the allowed pattern. diff --git a/src/main/java/org/apache/commons/codec/digest/MurmurHash.java b/src/main/java/org/apache/commons/codec/digest/MurmurHash.java index f68ff6d9..7c7c25c1 100644 --- a/src/main/java/org/apache/commons/codec/digest/MurmurHash.java +++ b/src/main/java/org/apache/commons/codec/digest/MurmurHash.java @@ -26,7 +26,7 @@ final class MurmurHash { * Gets the little-endian int from 4 bytes starting at the specified index. * * @param data The data. - * @param index The index + * @param index The index. * @return The little-endian int. */ static int getLittleEndianInt(final byte[] data, final int index) { @@ -42,7 +42,7 @@ final class MurmurHash { * Gets the little-endian long from 8 bytes starting at the specified index. * * @param data The data. - * @param index The index + * @param index The index. * @return The little-endian long. */ static long getLittleEndianLong(final byte[] data, final int index) { diff --git a/src/main/java/org/apache/commons/codec/digest/MurmurHash2.java b/src/main/java/org/apache/commons/codec/digest/MurmurHash2.java index daa18468..2871dc12 100644 --- a/src/main/java/org/apache/commons/codec/digest/MurmurHash2.java +++ b/src/main/java/org/apache/commons/codec/digest/MurmurHash2.java @@ -68,7 +68,7 @@ public final class MurmurHash2 { * </pre> * * @param data The input byte array. - * @param length The length of the array + * @param length The length of the array. * @return The 32-bit hash. * @see #hash32(byte[], int, int) */ @@ -80,7 +80,7 @@ public final class MurmurHash2 { * Generates a 32-bit hash from byte array with the given length and seed. * * @param data The input byte array. - * @param length The length of the array + * @param length The length of the array. * @param seed The initial seed value. * @return The 32-bit hash. */ @@ -155,7 +155,7 @@ public final class MurmurHash2 { * </pre> * * @param text The input string. - * @param from The starting index + * @param from The starting index. * @param length The length of the substring. * @return The 32-bit hash. * @see #hash32(byte[], int, int) @@ -186,7 +186,7 @@ public final class MurmurHash2 { * Generates a 64-bit hash from byte array of the given length and seed. * * @param data The input byte array. - * @param length The length of the array + * @param length The length of the array. * @param seed The initial seed value. * @return The 64-bit hash of the given array. */ @@ -272,7 +272,7 @@ public final class MurmurHash2 { * </pre> * * @param text The input string. - * @param from The starting index + * @param from The starting index. * @param length The length of the substring. * @return The 64-bit hash. * @see #hash64(byte[], int, int) diff --git a/src/main/java/org/apache/commons/codec/digest/Sha2Crypt.java b/src/main/java/org/apache/commons/codec/digest/Sha2Crypt.java index f5b3849c..c8389a8f 100644 --- a/src/main/java/org/apache/commons/codec/digest/Sha2Crypt.java +++ b/src/main/java/org/apache/commons/codec/digest/Sha2Crypt.java @@ -144,7 +144,7 @@ public class Sha2Crypt { * @param salt real salt value without prefix or {@code "rounds="}; may not be null. * @param saltPrefix either {@code $5$} or {@code $6$}. * @param blocksize a value that differs between {@code $5${@code and {@code $6$}. - * @param algorithm {@link MessageDigest} algorithm identifier string + * @param algorithm {@link MessageDigest} algorithm identifier string. * @return The Complete hash value including prefix and salt. * @throws IllegalArgumentException Thrown if the given salt is {@code null} or does not match the allowed pattern. * @throws IllegalArgumentException Thrown if a {@link NoSuchAlgorithmException} is caught. diff --git a/src/main/java/org/apache/commons/codec/language/bm/BeiderMorseEncoder.java b/src/main/java/org/apache/commons/codec/language/bm/BeiderMorseEncoder.java index da2857f4..8827d0a6 100644 --- a/src/main/java/org/apache/commons/codec/language/bm/BeiderMorseEncoder.java +++ b/src/main/java/org/apache/commons/codec/language/bm/BeiderMorseEncoder.java @@ -142,7 +142,7 @@ public class BeiderMorseEncoder implements StringEncoder { * * @param concat * true if multiple encodings are to be combined with a '|', false if just the first one is - * to be considered + * to be considered. */ public void setConcat(final boolean concat) { this.engine = new PhoneticEngine(this.engine.getNameType(), diff --git a/src/main/java/org/apache/commons/codec/language/bm/PhoneticEngine.java b/src/main/java/org/apache/commons/codec/language/bm/PhoneticEngine.java index 2232b754..b62568c9 100644 --- a/src/main/java/org/apache/commons/codec/language/bm/PhoneticEngine.java +++ b/src/main/java/org/apache/commons/codec/language/bm/PhoneticEngine.java @@ -248,7 +248,7 @@ public class PhoneticEngine { * Joins some strings with an internal separator. * * @param strings Strings to join. - * @param sep String to separate them with + * @param sep String to separate them with. * @return a single String consisting of each element of {@code strings} interleaved by {@code sep}. */ private static String join(final List<String> strings, final String sep) { @@ -271,7 +271,7 @@ public class PhoneticEngine { * @param nameType * the type of names it will use. * @param ruleType - * the type of rules it will apply + * the type of rules it will apply. * @param concatenate * if it will concatenate multiple encodings. */ @@ -285,11 +285,11 @@ public class PhoneticEngine { * @param nameType * the type of names it will use. * @param ruleType - * the type of rules it will apply + * the type of rules it will apply. * @param concatenate * if it will concatenate multiple encodings. * @param maxPhonemes - * the maximum number of phonemes that will be handled + * the maximum number of phonemes that will be handled. * @since 1.7 */ public PhoneticEngine(final NameType nameType, final RuleType ruleType, final boolean concatenate, final int maxPhonemes) { @@ -308,7 +308,7 @@ public class PhoneticEngine { * language-independent representation. * * @param phonemeBuilder the current phonemes. - * @param finalRules the final rules to apply + * @param finalRules the final rules to apply. * @return the resulting phonemes. */ private PhonemeBuilder applyFinalRules(final PhonemeBuilder phonemeBuilder, @@ -372,9 +372,9 @@ public class PhoneticEngine { * @param input * String to phoneticise; a String with dashes or spaces separating each word. * @param languageSet - * set of possible origin languages + * set of possible origin languages. * @return a phonetic representation of the input; a String containing '-'-separated phonetic representations of the - * input + * input. */ public String encode(String input, final Languages.LanguageSet languageSet) { final Map<String, List<Rule>> rules = Rule.getInstanceMap(this.nameType, RuleType.RULES, languageSet); diff --git a/src/main/java/org/apache/commons/codec/language/bm/Rule.java b/src/main/java/org/apache/commons/codec/language/bm/Rule.java index 3d53e6ae..17572311 100644 --- a/src/main/java/org/apache/commons/codec/language/bm/Rule.java +++ b/src/main/java/org/apache/commons/codec/language/bm/Rule.java @@ -361,7 +361,7 @@ public class Rule { * Gets rules for a combination of name type, rule type and languages. * * @param nameType the NameType to consider. - * @param rt the RuleType to consider + * @param rt the RuleType to consider. * @param langs the set of languages to consider. * @return a list of Rules that apply. */ @@ -376,7 +376,7 @@ public class Rule { * Gets rules for a combination of name type, rule type and a single language. * * @param nameType the NameType to consider. - * @param rt the RuleType to consider + * @param rt the RuleType to consider. * @param lang the language to consider. * @return a list of Rules that apply. */ @@ -388,7 +388,7 @@ public class Rule { * Gets rules for a combination of name type, rule type and languages. * * @param nameType the NameType to consider. - * @param rt the RuleType to consider + * @param rt the RuleType to consider. * @param langs the set of languages to consider. * @return a map containing all Rules that apply, grouped by the first character of the rule pattern. * @since 1.9 @@ -401,7 +401,7 @@ public class Rule { * Gets rules for a combination of name type, rule type and a single language. * * @param nameType the NameType to consider. - * @param rt the RuleType to consider + * @param rt the RuleType to consider. * @param lang the language to consider. * @return a map containing all Rules that apply, grouped by the first character of the rule pattern. * @since 1.9 @@ -630,7 +630,7 @@ public class Rule { * Creates a new rule. * * @param pattern the pattern. - * @param lContext the left context + * @param lContext the left context. * @param rContext the right context. * @param phoneme the resulting phoneme. */ @@ -682,7 +682,7 @@ public class Rule { * {@code pattern} matches at i and {@code rContext} matches from the end of the match of {@code pattern} to the end of {@code input}. * * @param input the input String. - * @param i the int position within the input + * @param i the int position within the input. * @return true if the pattern and left/right context match, false otherwise. */ public boolean patternAndContextMatches(final CharSequence input, final int i) { diff --git a/src/main/java/org/apache/commons/codec/net/QCodec.java b/src/main/java/org/apache/commons/codec/net/QCodec.java index f67e64db..4d2c162f 100644 --- a/src/main/java/org/apache/commons/codec/net/QCodec.java +++ b/src/main/java/org/apache/commons/codec/net/QCodec.java @@ -264,7 +264,7 @@ public class QCodec extends RFC1522Codec implements StringEncoder, StringDecoder * @param sourceStr * string to convert to quoted-printable form. * @param sourceCharset - * the Charset for sourceStr + * the Charset for sourceStr. * @return quoted-printable string. * @throws EncoderException * thrown if a failure condition is encountered during the encoding process. @@ -280,7 +280,7 @@ public class QCodec extends RFC1522Codec implements StringEncoder, StringDecoder * @param sourceStr * string to convert to quoted-printable form. * @param sourceCharset - * the Charset for sourceStr + * the Charset for sourceStr. * @return quoted-printable string. * @throws EncoderException * thrown if a failure condition is encountered during the encoding process. diff --git a/src/main/java/org/apache/commons/codec/net/URLCodec.java b/src/main/java/org/apache/commons/codec/net/URLCodec.java index 8b7e5b71..c16c55a0 100644 --- a/src/main/java/org/apache/commons/codec/net/URLCodec.java +++ b/src/main/java/org/apache/commons/codec/net/URLCodec.java @@ -256,7 +256,7 @@ public class URLCodec implements BinaryEncoder, BinaryDecoder, StringEncoder, St * @param str * URL safe string to convert into its original form. * @param charsetName - * the original string charset + * the original string charset. * @return original string. * @throws DecoderException * Thrown if URL decoding is unsuccessful. @@ -334,7 +334,7 @@ public class URLCodec implements BinaryEncoder, BinaryDecoder, StringEncoder, St * @param str * string to convert to a URL safe form. * @param charsetName - * the charset for str + * the charset for str. * @return URL safe string. * @throws UnsupportedEncodingException * Thrown if charset is not supported.
