This is an automated email from the ASF dual-hosted git repository. garydgregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-codec.git
commit 226631607f20b9ab314e5cf7f2bcb3346296e7fa Author: Gary Gregory <[email protected]> AuthorDate: Fri Aug 7 17:53:05 2026 -0400 Add missing Java @throws tags --- src/changes/changes.xml | 3 ++- .../java/org/apache/commons/codec/binary/BaseNCodecInputStream.java | 2 ++ src/main/java/org/apache/commons/codec/net/PercentCodec.java | 4 ++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/changes/changes.xml b/src/changes/changes.xml index b57ea63a..d4c9db0c 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -47,8 +47,9 @@ The <action> type attribute can be add,update,fix,remove. <!-- FIX --> <action type="fix" dev="ggregory" due-to="Yu Bao, Gary Gregory">Optimize PhoneticEngine.encode(String, LanguageSet) for speed.</action> <action type="fix" dev="ggregory" due-to="Yu Bao, Gary Gregory">RFC1522Codec.decodeText(String) now throws a DecoderException instead of a StringIndexOutOfBoundsException when a separator is missing.</action> - <action type="fix" dev="ggregory" due-to="Yu Bao, Gary Gregory">Optimize Base58.convertFromBase58(byte[], Context) for speed and temp object allocation.</action> + <action type="fix" dev="ggregory" due-to="Yu Bao, Gary Gregory">Optimize Base58.convertFromBase58(byte[], Context) for speed and temporary object allocation.</action> <action type="fix" dev="ggregory" due-to="Yu Bao, Gary Gregory">Allocate a single MessageDigest and use it in Sha2Crypt.sha2Crypt(byte[], String, String, int, String).</action> + <action type="fix" dev="ggregory" due-to="Gary Gregory">Javadoc improvements.</action> <!-- ADD --> <action type="add" dev="ggregory" due-to="Gary Gregory">Add and use PhoneticEngine.Builder and deprecate old constructors.</action> <action type="add" dev="ggregory" due-to="Gary Gregory">Add BeiderMorseEncoder.Builder and deprecate old constructor.</action> diff --git a/src/main/java/org/apache/commons/codec/binary/BaseNCodecInputStream.java b/src/main/java/org/apache/commons/codec/binary/BaseNCodecInputStream.java index cb70108a..5071bad1 100644 --- a/src/main/java/org/apache/commons/codec/binary/BaseNCodecInputStream.java +++ b/src/main/java/org/apache/commons/codec/binary/BaseNCodecInputStream.java @@ -131,6 +131,7 @@ public class BaseNCodecInputStream<C extends BaseNCodec, T extends BaseNCodecInp * {@inheritDoc} * * @return {@code 0} if the {@link InputStream} has reached {@code EOF}, {@code 1} otherwise. + * @throws IOException if an I/O error occurs. * @since 1.7 */ @Override @@ -269,6 +270,7 @@ public class BaseNCodecInputStream<C extends BaseNCodec, T extends BaseNCodecInp * {@inheritDoc} * * @throws IllegalArgumentException if the provided skip length is negative. + * @throws IOException if an I/O error occurs. * @since 1.7 */ @Override diff --git a/src/main/java/org/apache/commons/codec/net/PercentCodec.java b/src/main/java/org/apache/commons/codec/net/PercentCodec.java index a14bd8eb..dfc4ff65 100644 --- a/src/main/java/org/apache/commons/codec/net/PercentCodec.java +++ b/src/main/java/org/apache/commons/codec/net/PercentCodec.java @@ -106,6 +106,8 @@ public class PercentCodec implements BinaryEncoder, BinaryDecoder { /** * Decodes bytes encoded with Percent-Encoding based on RFC 3986. The reverse process is performed in order to * decode the encoded characters to Unicode. + * + * @throws DecoderException if an invalid percent-encoded sequence is found. */ @Override public byte[] decode(final byte[] bytes) throws DecoderException { @@ -175,6 +177,8 @@ public class PercentCodec implements BinaryEncoder, BinaryDecoder { /** * Percent-Encoding based on RFC 3986. The non US-ASCII characters are encoded, as well as the * US-ASCII characters that are configured to be always encoded. + * + * @throws EncoderException if an encoding error occurs. */ @Override public byte[] encode(final byte[] bytes) throws EncoderException {
