Liron Ar has posted comments on this change.
Change subject: core: Extract method of snapshot id.
......................................................................
Patch Set 3:
(3 comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RestoreAllSnapshotsCommand.java
Line 55: @LockIdNameAttribute
Line 56: public class RestoreAllSnapshotsCommand<T extends
RestoreAllSnapshotsParameters> extends VmCommand<T> implements
QuotaStorageDependent {
Line 57:
Line 58: private final Set<Guid> snapshotsToRemove = new HashSet<Guid>();
Line 59: Guid snapshotId;
1. private modifier
2. it;s never initiated, remove it..
Line 60:
Line 61: /**
Line 62: * The snapshot id which will be removed (the
stateless/preview/active image).
Line 63: */
Line 124:
Line 125: setSucceeded(succeeded);
Line 126: }
Line 127:
Line 128: private Guid getSnapshotId() {
please change the name, getter convention is misleading.
Line 129: return getParameters().getDstSnapshotId();
Line 130: }
Line 131:
Line 132: protected void removeSnapshotsFromDB() {
Line 337: @Override
Line 338: public Map<String, String> getJobMessageProperties() {
Line 339: if (jobProperties == null) {
Line 340: jobProperties = super.getJobMessageProperties();
Line 341: Snapshot snapshot = getSnapshotDao().get(snapshotId);
where was snapshotId initiated?
Line 342: if (snapshot != null) {
Line 343:
jobProperties.put(VdcObjectType.Snapshot.name().toLowerCase(),
snapshot.getDescription());
Line 344: }
Line 345: }
--
To view, visit http://gerrit.ovirt.org/20419
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I4754e381d70f08a9650596a4eeb3de296b3cb44f
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Sergey Gotliv <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches