Alon Bar-Lev has posted comments on this change.

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


Patch Set 5:

(1 comment)

http://gerrit.ovirt.org/#/c/26191/5/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 82:         }
Line 83:     }
Line 84: 
Line 85:     private static String getValueFromId(String id, String groupName) {
Line 86:         Matcher matcher = ID_PATTERN.matcher(decode(id));
but you match the regular expression N times per getValueFrom...

regular expression operation is very heavy, and should be avoided.
Line 87:         if (!matcher.matches()) {
Line 88:             throw new RuntimeException(String.format("Error in getting 
%1$s from ID string ", groupName));
Line 89:         }
Line 90:         return matcher.group(groupName);


-- 
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: 5
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