Skip to content

Commit 868a5bb

Browse files
committed
Bugfix long/int conversions
1 parent 55a1336 commit 868a5bb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

singlecell/src/org/labkey/singlecell/SingleCellController.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ public Object execute(SimpleApiJsonForm form, BindException errors) throws Excep
228228

229229
if (r.get("rowId") != null && StringUtils.trimToNull(r.get("rowId").toString()) != null)
230230
{
231-
sampleMap.put((String) r.get("objectId"), (Integer) r.get("rowId"));
231+
sampleMap.put((String) r.get("objectId"), Integer.parseInt(r.get("rowId").toString()));
232232
}
233233
else
234234
{
@@ -249,7 +249,7 @@ public Object execute(SimpleApiJsonForm form, BindException errors) throws Excep
249249
throw new ApiUsageException("Missing rowId for inserted sample row");
250250
}
251251

252-
sampleMap.put((String) r.get("objectId"), (Integer) r.get("rowId"));
252+
sampleMap.put((String) r.get("objectId"), Integer.parseInt(r.get("rowId").toString()));
253253
});
254254

255255
Map<String, Integer> sortMap = new HashMap<>();
@@ -262,7 +262,7 @@ public Object execute(SimpleApiJsonForm form, BindException errors) throws Excep
262262

263263
if (r.get("rowId") != null && StringUtils.trimToNull(r.get("rowId").toString()) != null)
264264
{
265-
sortMap.put((String) r.get("objectId"), (Integer) r.get("rowId"));
265+
sortMap.put((String) r.get("objectId"), Integer.parseInt(r.get("rowId").toString()));
266266
}
267267
else
268268
{
@@ -283,7 +283,7 @@ public Object execute(SimpleApiJsonForm form, BindException errors) throws Excep
283283
throw new ApiUsageException("Missing objectId for sort row");
284284
}
285285

286-
sortMap.put((String) r.get("objectId"), (Integer) r.get("rowId"));
286+
sortMap.put((String) r.get("objectId"), Integer.parseInt(r.get("rowId").toString()));
287287
});
288288

289289
readsetRows = sequenceAnalysis.getTable("sequence_readsets", null).getUpdateService().insertRows(getUser(), getContainer(), readsetRows, bve, null, new HashMap<>());

0 commit comments

Comments
 (0)