[Engine-devel] synthetic-access

Laszlo Hornyak lhornyak at redhat.com
Wed Feb 29 14:23:53 UTC 2012


Hi,

I am reviewing Allon's patches (e.g. http://gerrit.ovirt.org/#patch,sidebyside,2188,11,backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsGroupDAODbFacadeImpl.java ) and this is the first time I have met @SuppressWarnings("synthetic-access") annotations in the ovirt code. It is right, eclipse warns about the performance problem synthetic access (if turned on, by default it is turned off). This mostly happens in DAO's because rowmappers are private inner classes. What if, instead of adding an annotation to ignore this
 - we could make the rowmapper classes package protected?
 - or since most of these classes are stateless and thread safe, we can add a public final static rowmapper instance and instead of instantiating the rowmapper over and over again, use that single instance.

Please share your thoughts.

Thank you,
Laszlo



More information about the Devel mailing list