Skip to content

Commit afc229d

Browse files
committed
Apache/Oracle differences in Collections generic variables
<E> vs <T> in Singleton
1 parent e166b55 commit afc229d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
50 Bytes
Binary file not shown.

sources/net.sf.j2s.java.core/src/java/util/Collections.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1796,8 +1796,8 @@ public static void shuffle(List<?> list, Random random) {
17961796
* the element
17971797
* @return a Set containing the element
17981798
*/
1799-
public static <E> Set<E> singleton(E object) {
1800-
return new SingletonSet<E>(object);
1799+
public static <T> Set<T> singleton(T object) {
1800+
return new SingletonSet<T>(object);
18011801
}
18021802

18031803
/**
@@ -1808,8 +1808,8 @@ public static <E> Set<E> singleton(E object) {
18081808
* the element
18091809
* @return a List containing the element
18101810
*/
1811-
public static <E> List<E> singletonList(E object) {
1812-
return new SingletonList<E>(object);
1811+
public static <T> List<T> singletonList(T object) {
1812+
return new SingletonList<T>(object);
18131813
}
18141814

18151815
/**

0 commit comments

Comments
 (0)