Skip to content

Commit bd80d71

Browse files
committed
Use generics
1 parent 605fd25 commit bd80d71

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/org/apache/commons/jxpath/BasicNodeSet.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
public class BasicNodeSet implements NodeSet {
2828

2929
private final List<Pointer> pointers = new ArrayList<>();
30-
private List readOnlyPointers;
30+
private List<Pointer> readOnlyPointers;
3131
private List nodes;
3232
private List values;
3333

@@ -67,7 +67,7 @@ public synchronized List getNodes() {
6767
if (nodes == null) {
6868
nodes = new ArrayList<>();
6969
for (int i = 0; i < pointers.size(); i++) {
70-
final Pointer pointer = (Pointer) pointers.get(i);
70+
final Pointer pointer = pointers.get(i);
7171
nodes.add(pointer.getNode());
7272
}
7373
nodes = Collections.unmodifiableList(nodes);
@@ -76,7 +76,7 @@ public synchronized List getNodes() {
7676
}
7777

7878
@Override
79-
public synchronized List getPointers() {
79+
public synchronized List<Pointer> getPointers() {
8080
if (readOnlyPointers == null) {
8181
readOnlyPointers = Collections.unmodifiableList(pointers);
8282
}
@@ -88,7 +88,7 @@ public synchronized List getValues() {
8888
if (values == null) {
8989
values = new ArrayList<>();
9090
for (int i = 0; i < pointers.size(); i++) {
91-
final Pointer pointer = (Pointer) pointers.get(i);
91+
final Pointer pointer = pointers.get(i);
9292
values.add(pointer.getValue());
9393
}
9494
values = Collections.unmodifiableList(values);

0 commit comments

Comments
 (0)