On Nov 9, 2015, at 3:37 PM, Claes Redestad <claes.redes...@oracle.com> wrote: > > so we should add some test cases that guards against Wrapper.zero references > leaking through the public API and add stronger wording to Wrapper.zero > documentation? > > I turned your test case below into a jtreg test, included added variants for > the other integral primitive types: > > http://cr.openjdk.java.net/~redestad/scratch/wrapperTest.01/ > <http://cr.openjdk.java.net/~redestad/scratch/wrapperTest.01/> > > 1. int, short and long cases behave as expected: Wrapper.zero doesn't escape
Did any of these tests find a bug with any version of your code? If not, I don't think they pull their weight. > 2. void -> byte -> Object and void -> char -> Object box to null (test passes > with 8141678 applied); bug or intended? That would be a bug, but the test does not perform those changes. It goes void -> Character (null) -> Object (null).