Alon Bar-Lev has posted comments on this change.

Change subject: aaa: Introducing format to id of User and Group API entities
......................................................................


Patch Set 4:

(1 comment)

http://gerrit.ovirt.org/#/c/26191/4/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/utils/DirectoryEntryIdUtils.java
File 
backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/utils/DirectoryEntryIdUtils.java:

Line 35:      *            the id string
Line 36:      * @return the provider id part
Line 37:      */
Line 38:     public static String getProvider(String id) {
Line 39:         Matcher matcher = ID_PATTERN.matcher(decode(id));
hmmm... you match 3 time for single string instead of once...

consider having a class with constructor to get the various of groups.
Line 40:         if (matcher.matches()) {
Line 41:             return matcher.group("provider");
Line 42:         }
Line 43:         throw new RuntimeException("Error in getting provider name 
from ID string " + id);


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iaecb5d43945769db82475edde1c7075c1a343c07
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: Barak Azulay <bazu...@redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernan...@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