JDK 8 RFR 8016252: More defensive HashSet.readObject

Brian Burkhalter brian.burkhalter at oracle.com
Mon Oct 7 20:43:42 UTC 2013


On Oct 7, 2013, at 1:31 PM, Alan Bateman wrote:

> For size then I don't think the Math.max has any real effect because the loop don't do anything if size is negative You could just throw IllegalObjectException if it is negative (as per the first patch) if you really wanted to.

On second thought an exception really should be thrown on negative size; will update.

Brian


More information about the core-libs-dev mailing list