Skip to content

Commit 8f7d41a

Browse files
committed
Fix generic typing of Tables.wrap
The T variable for the map values is bound when the method is called. So the T will always refer exactly to the type of values the compiler knows the passed object to contain. I think there is no need to use "? extends T" and I am guessing it could cause problems downstream.
1 parent 7304123 commit 8f7d41a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/main/java/org/scijava/table/Tables.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,11 @@ private Tables() {
5757
* @param data The data to wrap. Each list element is a row; maps go from
5858
* column name to data.
5959
* @param rowHeaders List of row header labels. Pass null for no row headers.
60+
* @param <T> The type of data in each cell of the table.
6061
* @return A {@link Table} object wrapping the data structure.
6162
*/
6263
public static <T> Table<Column<T>, T> wrap(
63-
final List<? extends Map<?, ? extends T>> data, final List<String> rowHeaders)
64+
final List<? extends Map<?, T>> data, final List<String> rowHeaders)
6465
{
6566
if (data.isEmpty()) throw new IllegalArgumentException("Cannot wrap an empty list");
6667

0 commit comments

Comments
 (0)