Skip to content

Commit 55c4460

Browse files
author
emmanue1
committed
Update JD collection class
1 parent 1a880f7 commit 55c4460

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/main/java/org/jd/core/v1/util/Base.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ default T getLast() {
2525
}
2626

2727
default DefaultList<T> getList() {
28-
return (DefaultList<T>)this;
28+
throw new UnsupportedOperationException();
2929
}
3030

3131
default int size() {

src/main/java/org/jd/core/v1/util/DefaultList.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ public boolean isList() {
6666
return true;
6767
}
6868

69+
public DefaultList<E> getList() {
70+
return this;
71+
}
72+
6973
public static <T> DefaultList<T> emptyList() {
7074
return EMPTY_LIST;
7175
}

0 commit comments

Comments
 (0)