Roy Golan has submitted this change and it was merged.

Change subject: core: remove unneeded reflection use in SyntaxChecker
......................................................................


core: remove unneeded reflection use in SyntaxChecker

Using the built-in valueOf method of Enum instead of fancy, expensive
other ways to try to get the enum value.

The former code did eventually a valueOf check which is case sensitive
and then another EnumUtils method which was case *insensitive*. Since the
inner EnumUtils call would only be read on a match there is no point in 
repeating
the enum fetching twice, and in a very expensive way when we have a
ready made method for it.

Change-Id: Idd74aad49d292e64dec6f5925ffd186f13b9887c
Signed-off-by: Roy Golan <rgo...@redhat.com>
---
M 
backend/manager/modules/compat/src/main/java/org/ovirt/engine/core/compat/EnumCompat.java
M backend/manager/modules/searchbackend/pom.xml
M 
backend/manager/modules/searchbackend/src/main/java/org/ovirt/engine/core/searchbackend/SyntaxChecker.java
M 
backend/manager/modules/searchbackend/src/test/java/org/ovirt/engine/core/searchbackend/SyntaxCheckerTest.java
4 files changed, 57 insertions(+), 20 deletions(-)

Approvals:
  Roy Golan: Verified; Looks good to me, approved


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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idd74aad49d292e64dec6f5925ffd186f13b9887c
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Roy Golan <rgo...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Roy Golan <rgo...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to