Test for JDK-5108778 Too many instances of java.lang.Boolean created in Java application

Sebastian Sickelmann sebastian.sickelmann at gmx.de
Wed Sep 30 19:43:18 UTC 2015


a few days ago i started to investigate JDK-5108778[1] and started
for a small parts of it in macosx-port-dev[2] and hotspot-dev[3]. As
suggested by
Alexandr there should be a test that saves for regression for such
changes. I would
like to introduce a test like[4], what do you think?

It scans for all jimage-files in <java.home>/lib/modules and opens every
and scans every-method for a NEW-bytecode to a Wrapper-Type Classname.
Every match that is not in the Wrapper-Type itself is reported and counted.

I have some questions about this:
1. Is there a good way to get rid of the "9.0" part for reading the
classes out of the jimage?
2. What is with other Wrapper-Types (Byte,Short,Integer,Long, Character)
is it a good idea to also change such ctor of those? Would someone raise
an enhancement
for those?
3. How are value-types related to such an issue. Is it counterproductive
to change to XYZ.valueOf Method uses, or should we change to autoboxing
where possible? I haven't changed to autoboxing where i thought it would
be much less readable.
4. Should the changes be discussed in the group-lists? Or is there a
good place for discussion off central-changes?

-- Sebastian

[1] https://bugs.openjdk.java.net/browse/JDK-5108778

More information about the discuss mailing list