Alon Bar-Lev has posted comments on this change. Change subject: engine,userportal,webadmin: enhance locale selection ......................................................................
Patch Set 4: (2 comments) http://gerrit.ovirt.org/#/c/27973/4/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/servlet/UnsupportedLocaleHelper.java File backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/servlet/UnsupportedLocaleHelper.java: Line 40: String locales = backend.runPublicQuery(VdcQueryType.GetConfigurationValue, Line 41: new GetConfigurationValueParameters(configValues, Line 42: ConfigCommon.defaultConfigurationVersion)).getReturnValue(); Line 43: if (locales != null && !locales.isEmpty()) { Line 44: String[] localeKeys = locales.split(" *, *"); //$NON-NLS-1$ oh... this should be locales.trim().split(" *, *"), notice the trim() per my 1st comment :) Line 45: for (String localeKey: localeKeys) { Line 46: try { Line 47: //Check for valid locale. Line 48: org.apache.commons.lang.LocaleUtils.toLocale(localeKey.trim()); Line 45: for (String localeKey: localeKeys) { Line 46: try { Line 47: //Check for valid locale. Line 48: org.apache.commons.lang.LocaleUtils.toLocale(localeKey.trim()); Line 49: result.add(localeKey.trim()); still I claim that trim is not needed :)) per above split. Line 50: } catch (IllegalArgumentException iae) { Line 51: //The locale passed in is not valid, don't add it to the list. Line 52: } Line 53: } -- To view, visit http://gerrit.ovirt.org/27973 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5b816694d6c34549360b189eb85c840688957bdb Gerrit-PatchSet: 4 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alexander Wels <aw...@redhat.com> Gerrit-Reviewer: Alexander Wels <aw...@redhat.com> Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com> Gerrit-Reviewer: Einav Cohen <eco...@redhat.com> Gerrit-Reviewer: Greg Sheremeta <gsher...@redhat.com> Gerrit-Reviewer: Vojtech Szocs <vsz...@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