Piotr Kliczewski has posted comments on this change. Change subject: [WIP] engine : 998980 Generic mechanism for update diffs in audit ......................................................................
Patch Set 3: (7 comments) .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java Line 2: Line 3: import static org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.UPDATE_PARAMS; Line 4: import static org.ovirt.engine.core.utils.JsonUtils.buildJsonStringFromMaps; Line 5: import static org.ovirt.engine.core.utils.ObjectIdentityChecker.GetChangedFields; Line 6: import static org.ovirt.engine.core.utils.ObjectIdentityChecker.getValues; At the end of the day the byte code looks the same and the static methods are compiled into the class. As you can see my personal taste is a bit different. The question is what is the practice in ovirt? Line 7: Line 8: import java.io.Serializable; Line 9: import java.util.ArrayList; Line 10: import java.util.Arrays; .................................................... File backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/CommandBaseTest.java Line 11: import static org.mockito.Mockito.when; Line 12: import static org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.UPDATE_PARAMS; Line 13: import static org.ovirt.engine.core.utils.JsonUtils.NEW_VALUE; Line 14: import static org.ovirt.engine.core.utils.JsonUtils.OLD_VALUE; Line 15: import static org.ovirt.engine.core.utils.JsonUtils.buildTypeFromJson; Let's narrow down the practices used in ovirt. Line 16: import static org.ovirt.engine.core.utils.MockConfigRule.mockConfig; Line 17: Line 18: import java.util.Arrays; Line 19: import java.util.Collections; .................................................... File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java Line 833: Line 834: //mom policies Line 835: USER_UPDATED_MOM_POLICIES(10200), Line 836: USER_FAILED_TO_UPDATE_MOM_POLICIES(10201), Line 837: UPDATE_PARAMS(11100) General section is OK with me. Line 838: ; Line 839: Line 840: private int intValue; Line 841: // indicates time interval in seconds on which identical events from same instance are supressed. .................................................... File backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties Line 713: USER_FAILED_TO_UPDATE_MOM_POLICIES=Mom policy could not be updated on host ${VdsName}. Line 714: DISK_ALIGNMENT_SCAN_START=Starting alignment scan of disk '${DiskAlias}'. Line 715: DISK_ALIGNMENT_SCAN_FAILURE=Alignment scan of disk '${DiskAlias}' failed. Line 716: DISK_ALIGNMENT_SCAN_SUCCESS=Alignment scan of disk '${DiskAlias}' is complete. Line 717: UPDATE_PARAMS= Update parameters are ${update_params}. The intention was to have this space there. .................................................... File backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirectorTest.java Line 12: import static org.mockito.Mockito.times; Line 13: import static org.mockito.Mockito.verify; Line 14: import static org.mockito.Mockito.when; Line 15: import static org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.UPDATE_PARAMS; Line 16: import static org.ovirt.engine.core.utils.ReflectionUtils.setStaticField; Let's narrow down the practices for ovirt. Line 17: Line 18: import java.util.Collections; Line 19: import java.util.HashMap; Line 20: import java.util.Map; .................................................... File backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/JsonUtils.java Line 9: import org.codehaus.jackson.type.TypeReference; Line 10: import org.ovirt.engine.core.utils.log.Log; Line 11: import org.ovirt.engine.core.utils.log.LogFactory; Line 12: Line 13: public class JsonUtils { Good idea. Let's do it. Line 14: Line 15: public final static String NEW_VALUE = "new"; Line 16: Line 17: public final static String OLD_VALUE = "old"; .................................................... File backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/JsonUtilsTest.java Line 6: import static org.ovirt.engine.core.utils.JsonUtils.OLD_VALUE; Line 7: import static org.ovirt.engine.core.utils.JsonUtils.buildJsonStringFromMaps; Line 8: import static org.ovirt.engine.core.utils.JsonUtils.buildTypeFromJson; Line 9: import static org.ovirt.engine.core.utils.ObjectIdentityChecker.GetChangedFields; Line 10: import static org.ovirt.engine.core.utils.ObjectIdentityChecker.getValues; Let's narrow down the practices for ovirt. Line 11: Line 12: import java.io.IOException; Line 13: import java.util.HashMap; Line 14: import java.util.List; -- To view, visit http://gerrit.ovirt.org/20265 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If3362f9bfffe921df44103239ece8348001feca5 Gerrit-PatchSet: 3 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Piotr Kliczewski <piotr.kliczew...@gmail.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Itamar Heim <ih...@redhat.com> Gerrit-Reviewer: Martin Peřina <mper...@redhat.com> Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczew...@gmail.com> Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches