Skip to content

Commit

Permalink
refactor: fix array to array list test (#17)
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Klymenko <alx@alx.com>
  • Loading branch information
alxkm and Alex Klymenko authored Aug 3, 2024
1 parent 766877c commit 3dae101
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/streamer/StreamUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public static <T> Stream<T> asStream(Iterable<T> iterable) {
* @return a collection containing elements from the array
* @throws IllegalArgumentException if the collection creation fails
*/
public static <T> Collection<T> arrayToCollection(final Class<? extends Collection<T>> collectionType, final T[] array) {
public static <T> Collection<T> arrayToCollection(final Class<? extends Collection> collectionType, final T[] array) {
try {
final Collection<T> collection = collectionType.getDeclaredConstructor().newInstance();
collection.addAll(Arrays.asList(array));
Expand Down

0 comments on commit 3dae101

Please sign in to comment.