Yair Zaslavsky has posted comments on this change. Change subject: aaa: fix error messages of basic authentication filter ......................................................................
Patch Set 2: (1 comment) http://gerrit.ovirt.org/#/c/36206/2/backend/manager/modules/aaa/src/main/java/org/ovirt/engine/core/aaa/filters/BasicAuthenticationFilter.java File backend/manager/modules/aaa/src/main/java/org/ovirt/engine/core/aaa/filters/BasicAuthenticationFilter.java: Line 46: private static final Map<Integer, String> authResultMap; Line 47: static { Line 48: try { Line 49: authResultMap = new HashMap<Integer, String>(); Line 50: for (java.lang.reflect.Field field : Authn.AuthResult.class.getFields()) { And this is why enums are nicer :) with enum you wouldn't have needed to write ugly reflection code. I would consider to Add this piece of code to somewhere more generic in extapi. Please also perform import of java.lang.reflect.Field, so the code will look like for (Field.... ) Line 51: authResultMap.put((Integer)field.get(null), field.getName()); Line 52: } Line 53: } catch (IllegalAccessException e) { Line 54: throw new RuntimeException(e); -- To view, visit http://gerrit.ovirt.org/36206 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3ec060ee36bc94a2c8b40501358b21e4da44c4ca Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alon Bar-Lev <alo...@redhat.com> Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com> Gerrit-Reviewer: Ondřej Macháček <machacek.on...@gmail.com> Gerrit-Reviewer: Oved Ourfali <oourf...@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