Skip to content

Commit

Permalink
Handle byte[] case when constructing a list of objects
Browse files Browse the repository at this point in the history
  • Loading branch information
roimenashe committed Dec 5, 2023
1 parent b6062fd commit 5eba0b9
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ public static List<Object> getIdValue(Qualifier qualifier) {
private static List<Object> idObjectToList(Object ids) {
List<Object> result;
Assert.notNull(ids, "Ids must not be null");
if (ids.getClass().isArray()) {

if (ids instanceof byte[]) {
result = List.of(ids);
} else if (ids.getClass().isArray()) {
result = Arrays.stream(((Object[]) ids)).toList();
} else if (ids instanceof Collection<?>) {
result = new ArrayList<>((Collection<?>) ids);
Expand Down

0 comments on commit 5eba0b9

Please sign in to comment.