Yair Zaslavsky has posted comments on this change.
Change subject: core: Moves VmPropertiesUtils to CustomPropetiesUtils
......................................................................
Patch Set 1: (2 inline comments)
What about the validation error messages themselves?
Do we need to change them?
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/InitBackendServicesOnStartupBean.java
Line 55:
Line 56: GlusterJobsManager.init();
Line 57:
Line 58: try {
Line 59: log.info("Init VM custom properties utilities");
Please change the log message.
Also, the fact this utility is initialized here proves my point about the bad
singleton instantiation in my previous comment.
Line 60: CustomPropertiesUtils.getInstance().init();
Line 61: } catch (InitializationException e) {
Line 62: log.error("Initialization of vm custom properties
failed.",e);
Line 63: }
....................................................
File
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/customprop/CustomPropertiesUtils.java
Line 28: public class CustomPropertiesUtils {
Line 29:
Line 30: private static CustomPropertiesUtils vmPropertiesUtils = null;
Line 31:
Line 32: public static CustomPropertiesUtils getInstance() {
I would recommend also to change this initialization.
Not sure why we need this double lock pattern which does not work. Having a
static initializer is enough. This can be in separate patch.
Line 33: if (vmPropertiesUtils == null) {
Line 34: synchronized (CustomPropertiesUtils.class) {
Line 35: if (vmPropertiesUtils == null) {
Line 36: vmPropertiesUtils = new CustomPropertiesUtils();
--
To view, visit http://gerrit.ovirt.org/14813
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib18a622a1d02f444c6bdc1e22c2f92f93c52757e
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Peřina <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Michal Skrivanek <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches