IDEMPIERE-2297 Use browser default language instead of Client System's / fix potential NPE

This commit is contained in:
Carlos Ruiz 2014-11-26 17:03:53 -05:00
parent 05f9f72aac
commit 9adaa4be7e
1 changed files with 3 additions and 0 deletions

View File

@ -664,6 +664,9 @@ public class LoginPanel extends Window implements EventListener<Event>
/** get default languages from the browser */ /** get default languages from the browser */
private List<String> browserLanguages(String header) { private List<String> browserLanguages(String header) {
List<String> arrstr = new ArrayList<String>(); List<String> arrstr = new ArrayList<String>();
if (header == null)
return arrstr;
for (String str : header.split(",")){ for (String str : header.split(",")){
String[] arr = str.trim().replace("-", "_").split(";"); String[] arr = str.trim().replace("-", "_").split(";");