Skip to content

Commit 21969f1

Browse files
[CST-3146] minor fixes to keep division decimal value and to copy putCodes list
1 parent eaf010f commit 21969f1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dspace-cris/api/src/main/java/org/dspace/app/cris/integration/orcid/OrcidOnlineDataLoader.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public List<Record> getByIdentifier(Context context,
142142
{
143143

144144
if (putCodes.size() == MAX_BULK_WORK) {
145-
DTOBulkPutCode bulkObject = new DTOBulkPutCode(orcid, putCodes, profile);
145+
DTOBulkPutCode bulkObject = new DTOBulkPutCode(orcid, putCodes, profile);
146146
bulkCallList.add(bulkObject);
147147
putCodes.clear();
148148
}
@@ -166,7 +166,7 @@ public List<Record> getByIdentifier(Context context,
166166

167167

168168
if(bulkCallList!=null && !bulkCallList.isEmpty()) {
169-
Double res = Math.ceil(bulkCallList.size() / getNumberOfThread());
169+
Double res = Math.ceil((double)bulkCallList.size() / getNumberOfThread());
170170
Integer maxBulkCallForThread = res.intValue();
171171

172172
List<List<DTOBulkPutCode>> bulkCallListPartitioned = ListUtils.partition(bulkCallList, maxBulkCallForThread);
@@ -459,7 +459,7 @@ public DTOBulkPutCode(String orcid, List<String> putCodes,
459459
PersonalDetails profile)
460460
{
461461
this.orcid = orcid;
462-
this.putCode = putCodes;
462+
this.putCode = new ArrayList<>(putCodes);
463463
this.profile = profile;
464464
}
465465

0 commit comments

Comments
 (0)