Skip to content

Commit e448eaf

Browse files
committed
Use List.get(0) instead of getFirst() so this compiles on Java 17
This module sets sourceCompatibility=17, but List.getFirst() was added in Java 21 (SequencedCollection), so it failed to resolve. Replaced both calls with List.get(0).
1 parent d8e37ff commit e448eaf

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

laboratory/src/org/labkey/laboratory/assay/AssayHelper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,13 @@ public Map<String, Object> saveTemplate(User u, Container c, ExpProtocol protoco
153153
throw bve;
154154
}
155155

156-
return rows.getFirst();
156+
return rows.get(0);
157157
}
158158
else
159159
{
160160
row.put("rowid", templateId);
161161
List<Map<String, Object>> rows = ti.getUpdateService().updateRows(u, c, Arrays.asList(row), Arrays.asList(Map.of("rowId", templateId)), null, null);
162-
return rows.getFirst();
162+
return rows.get(0);
163163
}
164164
}
165165
catch (Exception e)

0 commit comments

Comments
 (0)