RFR: 8301220: Return value of toArray() of Сollection types from java.base should be trusted

Tingjun Yuan duke at openjdk.org
Fri Jan 27 13:42:17 UTC 2023


On Fri, 27 Jan 2023 12:15:34 GMT, Glavo <duke at openjdk.org> wrote:

> > What about Collections.synchronizedCollection and other methods that may wrap/delagete to collections from other modules?
> 
> Good question, I missed this point. I think I should provide a helper method to check whether the collection is trusted.

Maybe you can add an internal annotation and annotate all trusted collection classes with it.

-------------

PR: https://git.openjdk.org/jdk/pull/12212


More information about the core-libs-dev mailing list