Skip to content

Commit

Permalink
Update search condition
Browse files Browse the repository at this point in the history
  • Loading branch information
gsergiu authored Sep 11, 2024
1 parent ff5938b commit 9410be2
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -477,10 +477,9 @@ private List<String> reorderItemDescriptions(UserSet userSet, List<String> itemD
UserSetUtils.extractItemIdentifier(itemUri, getConfiguration().getItemDataEndpoint());
// escape "/" to "\/" to match json string
localId = StringUtils.replace(localId, "/", "\\/");
String idWithSpace="\"id\": \"" + localId + '"';
for (String description : itemDescriptions) {
String idWithoutSpace="\"id\":" + "\"" + localId + "\"";
String idWithSpace="\"id\":" + " " + "\"" + localId + "\"";
if (description.contains(idWithoutSpace) || description.contains(idWithSpace)) {
if (description.contains(idWithSpace)) {
orderedItemDescriptions.add(description);
found = true;
break;
Expand Down

0 comments on commit 9410be2

Please sign in to comment.