From b9420079f49a6fd8a41c5c87cb55ae8e9639c93b Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 16 Oct 2013 17:55:48 -0500 Subject: [PATCH] IDEMPIERE-1403 NPE when empty language combobox in login screen / minor peer review --- .../src/org/adempiere/webui/panel/LoginPanel.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/LoginPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/LoginPanel.java index 7c4d3e5908..53c1a129a1 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/LoginPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/LoginPanel.java @@ -99,7 +99,7 @@ public class LoginPanel extends Window implements EventListener /** * */ - private static final long serialVersionUID = -3317111366328505399L; + private static final long serialVersionUID = -3361823499124119753L; private static LogAuthFailure logAuthFailure = new LogAuthFailure(); @@ -120,7 +120,7 @@ public class LoginPanel extends Window implements EventListener protected A btnResetPassword; protected ConfirmPanel pnlButtons; protected boolean email_login = MSysConfig.getBooleanValue(MSysConfig.USE_EMAIL_FOR_LOGIN, false); - protected String vailidLstLanguage = null; + protected String validLstLanguage = null; public LoginPanel(Properties ctx, LoginWindow loginWindow) { @@ -382,7 +382,7 @@ public class LoginPanel extends Window implements EventListener btnResetPassword.setId("btnResetPassword"); if (lstLanguage.getItems().size() > 0){ - vailidLstLanguage = (String)lstLanguage.getItems().get(0).getLabel(); + validLstLanguage = (String)lstLanguage.getItems().get(0).getLabel(); } } @@ -402,12 +402,12 @@ public class LoginPanel extends Window implements EventListener { if(eventComp.getId().equals(lstLanguage.getId())) { if (lstLanguage.getSelectedItem() == null){ - lstLanguage.setValue(vailidLstLanguage); + lstLanguage.setValue(validLstLanguage); }else{ - vailidLstLanguage = lstLanguage.getSelectedItem().getLabel(); + validLstLanguage = lstLanguage.getSelectedItem().getLabel(); } - languageChanged(vailidLstLanguage); + languageChanged(validLstLanguage); } } else if (event.getTarget() == btnResetPassword)