Skip to content

Tag: heap-pollution

Is there any scenario where heap pollution from parameterized vararg type occurs without an explicit `Object[]` conversion?

I have been looking at various answers and articles regarding heap pollution when using non-reifiable varargs parameters. All examples I have found use an Object[] conversion followed by an array element write. The heap pollution only ever seems to occur in this manner, for example: Some other articles (such as this SO answer) also appear to be incorrect or entirely