Alon Bar-Lev has posted comments on this change.

Change subject: aaa: Intrdoucing of ExtensionException
......................................................................


Patch Set 2:

(7 comments)

http://gerrit.ovirt.org/#/c/25507/2/backend/manager/modules/aaa/src/main/java/org/ovirt/engine/core/aaa/Directory.java
File 
backend/manager/modules/aaa/src/main/java/org/ovirt/engine/core/aaa/Directory.java:

Line 33:      *
Line 34:      * @param name the name of the user
Line 35:      * @return the user corresponding to the given name or {@code 
null} if no such user can be found
Line 36:      */
Line 37:     public abstract DirectoryUser findUser(String name) throws 
ExtensionException;
please make it RuntimeException and drop these
Line 38: 
Line 39:     /**
Line 40:      * Retrieves a user from the directory given its identifier.
Line 41:      *


http://gerrit.ovirt.org/#/c/25507/2/backend/manager/modules/extension-manager/src/main/java/org/ovirt/engine/core/extensions/mgr/ExtensionException.java
File 
backend/manager/modules/extension-manager/src/main/java/org/ovirt/engine/core/extensions/mgr/ExtensionException.java:

Line 1: package org.ovirt.engine.core.extensions.mgr;
Line 2: 
Line 3: public class ExtensionException extends RuntimeException {
if it already extends RuntimeException, why have you added it to all prototypes?
Line 4: 
Line 5: 
Line 6:     public enum ExtensionError { INCORRET_CREDENTIALS,
Line 7:                                  CREDENTIALS_EXPIRED,


Line 3: public class ExtensionException extends RuntimeException {
Line 4: 
Line 5: 
Line 6:     public enum ExtensionError { INCORRET_CREDENTIALS,
Line 7:                                  CREDENTIALS_EXPIRED,
> What about something representing account locked or disabled - I assume thi
locked and disabled are ok.

please indent enums:

 enum xxx {
    value1,
    value2,

so that adding a value before the first will not need to modify the declaration.

bad that java does not allow empty comma at last entry...
Line 8:                                  INVALID_CONFIGURATION,
Line 9:                                  SERVER_IS_NOT_AVAILABLE,
Line 10:                                  GENERAL_ERROR
Line 11:                                  };


Line 5: 
Line 6:     public enum ExtensionError { INCORRET_CREDENTIALS,
Line 7:                                  CREDENTIALS_EXPIRED,
Line 8:                                  INVALID_CONFIGURATION,
Line 9:                                  SERVER_IS_NOT_AVAILABLE,
> Question - I assume I will be using "SERVER_IS_NOT_AVAILBLE" for communicat
TIMEOUT is good reason to add.
Line 10:                                  GENERAL_ERROR
Line 11:                                  };
Line 12: 
Line 13:     public ExtensionException(ExtensionError error) {


Line 9:                                  SERVER_IS_NOT_AVAILABLE,
Line 10:                                  GENERAL_ERROR
Line 11:                                  };
Line 12: 
Line 13:     public ExtensionException(ExtensionError error) {
always have a message in addition to error.
Line 14:         this.error = error;
Line 15:     }
Line 16: 
Line 17:     public ExtensionException(ExtensionError error, Throwable cause) {


Line 23:         super(message);
Line 24:         this.error = error;
Line 25:     }
Line 26: 
Line 27:     public ExtensionException(ExtensionError error, String message, 
Throwable cause) {
this is correct, all we need is with cause and without cause.
Line 28:         super(message, cause);
Line 29:         this.error = error;
Line 30:     }
Line 31: 


Line 32:     public ExtensionError getError() {
Line 33:         return error;
Line 34:     }
Line 35: 
Line 36:     private ExtensionError error;
should be final, no?

why member is not first in class?
Line 37: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie5cb41bf103c6345e501a81cbe247dc53051d0db
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
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

Reply via email to