0

I have the following interface:

public interface DataLoadedListener<T> {
    void onDataLoaded(T... data);
}

But on "onDataLoaded" i get the following warning: "Possible heap pollution from parameterized vararg type"

Cah someone explain me why and how to fix it?

Nifhel
  • 2,013
  • 2
  • 26
  • 39
  • Information about "possible heap pollution" are available [on this question](http://stackoverflow.com/questions/12462079/potential-heap-pollution-via-varargs-parameter) or [on this one](http://programmers.stackexchange.com/questions/155994/java-heap-pollution). But there are black magic like `@SuppressWarning` or `@SafeVarargs` if you just don't want to see these warning... – NiziL Feb 04 '15 at 15:46
  • See also [Oracle's detailed explanation](http://docs.oracle.com/javase/7/docs/technotes/guides/language/non-reifiable-varargs.html). – Jesper Feb 04 '15 at 15:48

0 Answers0