How do I remove the warning from a EasyMock.anyObject(List.class) call

It’s not possible. I’ll call it a generic limitation. Sadly it’s not always possible to remove a warning for some perfectly normal usage (like using the class of a generic class).

However, with EasyMock you can do the following:

EasyMock.<List<MyType>> anyObject()

which will do the same thing but without warning. The anyObject you used exist because it’s a bit more readable and allows static imports.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)