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 2022/11/25 14:55:26 UTC
[commons-jexl] branch master updated: Use toArray() with 0 size array pattern
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-jexl.git
The following commit(s) were added to refs/heads/master by this push:
new 8561aa3f Use toArray() with 0 size array pattern
8561aa3f is described below
commit 8561aa3f91abe86c6d5703bda89a1c837c54499c
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Nov 25 09:55:21 2022 -0500
Use toArray() with 0 size array pattern
---
src/test/java/org/apache/commons/jexl3/VarTest.java | 2 +-
.../org/apache/commons/jexl3/internal/introspection/MethodKeyTest.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/test/java/org/apache/commons/jexl3/VarTest.java b/src/test/java/org/apache/commons/jexl3/VarTest.java
index 796b2b9c..736708a1 100644
--- a/src/test/java/org/apache/commons/jexl3/VarTest.java
+++ b/src/test/java/org/apache/commons/jexl3/VarTest.java
@@ -494,7 +494,7 @@ public class VarTest extends JexlTestCase {
}
// discard all chars not in identifier
}
- return ids.toArray(new String[ids.size()]);
+ return ids.toArray(new String[0]);
}
@Test
diff --git a/src/test/java/org/apache/commons/jexl3/internal/introspection/MethodKeyTest.java b/src/test/java/org/apache/commons/jexl3/internal/introspection/MethodKeyTest.java
index c3e3fd20..e94c0161 100644
--- a/src/test/java/org/apache/commons/jexl3/internal/introspection/MethodKeyTest.java
+++ b/src/test/java/org/apache/commons/jexl3/internal/introspection/MethodKeyTest.java
@@ -108,7 +108,7 @@ public class MethodKeyTest {
}
}
}
- KEY_LIST = BY_KEY.keySet().toArray(new MethodKey[BY_KEY.size()]);
+ KEY_LIST = BY_KEY.keySet().toArray(new MethodKey[0]);
}
/** Builds a string key */