0

I have a line saying

List<FilterConfig> configs = filter.getFilterConfig();

and IntelliJ warns me about

Unchecked assignment: java.util.List to java.util.List<com.sencha.gxt.data.shared.loader.FilterConfig>

However, the called method says:

public abstract List<FilterConfig> getFilterConfig();

so I do not see any unchecked cast here.

https://docs.sencha.com/gxt/javadoc/com/sencha/gxt/widget/core/client/grid/filters/Filter.html https://docs.sencha.com/gxt/javadoc/com/sencha/gxt/data/shared/loader/FilterConfig.html

Sebastian
  • 5,721
  • 3
  • 43
  • 69
  • 1
    Noting the plain `java.util.List`, do you have a raw type somewhere? Raw types have a somewhat viral effect: once you've got a raw type somewhere (including, but not limited to, `extends MyGenericType` (without the generics)), a lot of things that look like they should be non-raw are considered raw. – Andy Turner Jul 06 '16 at 13:58

1 Answers1

1

Thanks to Andy, I've found the problem: filter was a raw type here but I thought this should not affect getFilterConfig().

As soon as I changed

Filter filter

to

Filter<?,?> filter

the warning disappeared.

Sebastian
  • 5,721
  • 3
  • 43
  • 69