You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2025/10/18 18:21:07 UTC
(commons-codec) 01/04: Better internal name
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 c5f66c9303700f6ee1e426981e33027b4b7b83dc
Author: Gary D. Gregory <ga...@gmail.com>
AuthorDate: Sun Oct 12 18:31:26 2025 -0400
Better internal name
---
.../org/apache/commons/codec/binary/BaseNCodec.java | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 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 59c785c3..fde69ca1 100644
--- a/src/main/java/org/apache/commons/codec/binary/BaseNCodec.java
+++ b/src/main/java/org/apache/commons/codec/binary/BaseNCodec.java
@@ -389,6 +389,16 @@ public abstract class BaseNCodec implements BinaryEncoder, BinaryDecoder {
return CHUNK_SEPARATOR.clone();
}
+ /**
+ * Gets the array length or 0 if null.
+ *
+ * @param array the array or null.
+ * @return the array length or 0 if null.
+ */
+ static int getLength(final byte[] array) {
+ return array == null ? 0 : array.length;
+ }
+
/**
* Checks if a byte value is whitespace or not.
*
@@ -425,16 +435,6 @@ public abstract class BaseNCodec implements BinaryEncoder, BinaryDecoder {
return b;
}
- /**
- * Gets the array length or 0 if null.
- *
- * @param array the array or null.
- * @return the array length or 0 if null.
- */
- static int toLength(final byte[] array) {
- return array == null ? 0 : array.length;
- }
-
/**
* Deprecated: Will be removed in 2.0.
* <p>