Allon Mureinik has posted comments on this change.

Change subject: engine: Deprecate new Guid()
......................................................................


Patch Set 2: (3 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AfterDeactivateSingleAsyncOperationFactory.java
Line 4: import org.ovirt.engine.core.utils.ISingleAsyncOperation;
Line 5: 
Line 6: public class AfterDeactivateSingleAsyncOperationFactory extends 
ActivateDeactivateSingleAsyncOperationFactory {
Line 7:     private boolean _isLastMaster;
Line 8:     private Guid _newMasterStorageDomainId = Guid.Empty;
See the commit message.
new Guid() returns an empty guid, so I used the single instance.

For tests, if the actual value of the guid is not interesting, I use 
Guid.newGuid(), to eliminate the assumption the guid was indeed empty.
Line 9: 
Line 10:     @Override
Line 11:     public ISingleAsyncOperation createSingleAsyncOperation() {
Line 12:         return new AfterDeactivateSingleAsyncOperation(getVdss(), 
getStorageDomain(), getStoragePool(), _isLastMaster,


....................................................
File 
backend/manager/modules/compat/src/main/java/org/ovirt/engine/core/compat/Guid.java
Line 22:     protected UUID uuid;
Line 23: 
Line 24:     /**
Line 25:      * This constructor should never be used directly - use {@link 
#Empty} instead.
Line 26:      * It is left here only becuase GWT requires it.
will fix, thanks.
Line 27:      */
Line 28:     @Deprecated
Line 29:     private Guid() {
Line 30:         this(Empty.getUuid());


Line 25:      * This constructor should never be used directly - use {@link 
#Empty} instead.
Line 26:      * It is left here only becuase GWT requires it.
Line 27:      */
Line 28:     @Deprecated
Line 29:     private Guid() {
surprisignly, yes
Line 30:         this(Empty.getUuid());
Line 31:     }
Line 32: 
Line 33:     public Guid(UUID uuid) {


-- 
To view, visit http://gerrit.ovirt.org/15698
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id80dc50896a9874731300f543a72838c345cbcdd
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Alissa Bonas <abo...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Liron Ar <lara...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Michael Pasternak <mpast...@redhat.com>
Gerrit-Reviewer: Mike Kolesnik <mkole...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Sergey Gotliv <sgot...@redhat.com>
Gerrit-Reviewer: Tal Nisan <tni...@redhat.com>
Gerrit-Reviewer: Vered Volansky <vvola...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to