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/03/17 00:35:37 UTC
(commons-jxpath) 06/10: Use generics internally
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-jxpath.git
commit 1c5cd86f170232b014296e0cc69f17a11ae6c597
Author: Gary D. Gregory <ga...@gmail.com>
AuthorDate: Sun Mar 16 19:59:06 2025 -0400
Use generics internally
---
.../java/org/apache/commons/jxpath/ri/axes/DescendantContext.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/commons/jxpath/ri/axes/DescendantContext.java b/src/main/java/org/apache/commons/jxpath/ri/axes/DescendantContext.java
index 6159a10..61a8dd1 100644
--- a/src/main/java/org/apache/commons/jxpath/ri/axes/DescendantContext.java
+++ b/src/main/java/org/apache/commons/jxpath/ri/axes/DescendantContext.java
@@ -73,7 +73,7 @@ public class DescendantContext extends EvalContext {
private boolean isRecursive() {
final Object node = currentNodePointer.getNode();
for (int i = stack.size() - 1; --i >= 0;) {
- final NodeIterator it = (NodeIterator) stack.get(i);
+ final NodeIterator it = stack.get(i);
final Pointer pointer = it.getNodePointer();
if (pointer != null && pointer.getNode() == node) {
return true;
@@ -103,7 +103,7 @@ public class DescendantContext extends EvalContext {
}
}
while (!stack.isEmpty()) {
- final NodeIterator it = (NodeIterator) stack.peek();
+ final NodeIterator it = stack.peek();
if (it.setPosition(it.getPosition() + 1)) {
currentNodePointer = it.getNodePointer();
if (!isRecursive()) {