Skip to content

Commit 5487159

Browse files
committed
Fix generics compiler warnings
1 parent 9f91c1b commit 5487159

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/org/apache/commons/jxpath/ri/EvalContext.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public abstract class EvalContext implements ExpressionContext, Iterator {
5353
private boolean startedSetIteration = false;
5454
private boolean done = false;
5555
private boolean hasPerformedIteratorStep = false;
56-
private Iterator pointerIterator;
56+
private Iterator<Pointer> pointerIterator;
5757

5858
/**
5959
* Create a new EvalContext.
@@ -178,8 +178,8 @@ public void remove() {
178178
* @return whether the Iterator was constructed
179179
*/
180180
private boolean constructIterator() {
181-
final HashSet set = new HashSet();
182-
final ArrayList list = new ArrayList();
181+
final HashSet<Pointer> set = new HashSet<>();
182+
final ArrayList<Pointer> list = new ArrayList<>();
183183
while (nextSet()) {
184184
while (nextNode()) {
185185
final NodePointer pointer = getCurrentNodePointer();
@@ -227,7 +227,7 @@ public List getContextNodeList() {
227227
if (pos != 0) {
228228
reset();
229229
}
230-
final List list = new ArrayList();
230+
final List<Pointer> list = new ArrayList<>();
231231
while (nextNode()) {
232232
list.add(getCurrentNodePointer());
233233
}

0 commit comments

Comments
 (0)