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-lang.git
The following commit(s) were added to refs/heads/master by this push:
new e2f8d1bd8 Add missing test coverage for
org.apache.commons.lang3.ArrayUtils.startsWith(byte[], byte[])
e2f8d1bd8 is described below
commit e2f8d1bd8f5a1715942d68fa4f3680b84cf902ba
Author: Gary D. Gregory <[email protected]>
AuthorDate: Mon Jun 16 11:50:16 2025 -0400
Add missing test coverage for
org.apache.commons.lang3.ArrayUtils.startsWith(byte[], byte[])
---
src/test/java/org/apache/commons/lang3/ArrayUtilsTest.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/test/java/org/apache/commons/lang3/ArrayUtilsTest.java
b/src/test/java/org/apache/commons/lang3/ArrayUtilsTest.java
index 0633f959d..62b9107b7 100644
--- a/src/test/java/org/apache/commons/lang3/ArrayUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/ArrayUtilsTest.java
@@ -5313,6 +5313,8 @@ void testStartsWith() {
// data is as expected
System.arraycopy(sig, 0, data, 0, sig.length);
assertTrue(ArrayUtils.startsWith(data, sig));
+ // expected len > data len
+ assertFalse(ArrayUtils.startsWith(new byte[1], new byte[2]));
}
@Test