I'm using mockito to write some tests, and I'm using the following bit of code:
ArgumentCaptor<LinkedList> captor = ArgumentCaptor.forClass(LinkedList.class);
This compiles and runs just fine, except for the warning that "captor" is raw type and I should replace it with something like:
ArgumentCaptor<LinkedList<String>> captor = ArgumentCaptor.forClass(LinkedList<String>.class);
The problem is that LinkedList<String>.class doesn't exist, so the right side of the assignment will never compile.
Assuming that suppressing the warning is inelegant, is there an elegant solution? If not, why does the compile warn me about something I can't really fix?
>` using `Arrays.asList`?
– Paul Boddington Dec 21 '14 at 05:35