--- a/jdk/src/share/classes/java/util/AbstractList.java Sat Dec 18 09:10:49 2010 -0800
+++ b/jdk/src/share/classes/java/util/AbstractList.java Mon Dec 20 13:47:04 2010 -0800
@@ -482,8 +482,8 @@
*/
public List<E> subList(int fromIndex, int toIndex) {
return (this instanceof RandomAccess ?
- new RandomAccessSubList<E>(this, fromIndex, toIndex) :
- new SubList<E>(this, fromIndex, toIndex));
+ new RandomAccessSubList<>(this, fromIndex, toIndex) :
+ new SubList<>(this, fromIndex, toIndex));
}
// Comparison and hashing
@@ -747,7 +747,7 @@
}
public List<E> subList(int fromIndex, int toIndex) {
- return new SubList<E>(this, fromIndex, toIndex);
+ return new SubList<>(this, fromIndex, toIndex);
}
private void rangeCheck(int index) {
@@ -776,6 +776,6 @@
}
public List<E> subList(int fromIndex, int toIndex) {
- return new RandomAccessSubList<E>(this, fromIndex, toIndex);
+ return new RandomAccessSubList<>(this, fromIndex, toIndex);
}
}