IDEMPIERE-6017 Fix NPE in MoveClient when a column does not exist (#2218)
This commit is contained in:
parent
6b05bde8a9
commit
8422123487
|
@ -981,7 +981,7 @@ public class Login
|
|||
at = "P|" + rs.getString(1);
|
||||
else
|
||||
at = "P" + AD_Window_ID + "|" + rs.getString(1);
|
||||
}else if ("P".equals(PreferenceFor)){ // preference for processs
|
||||
}else if ("P".equals(PreferenceFor)){ // preference for process
|
||||
// when apply for all window or all process format is "P0|0|m_Attribute;
|
||||
at = "P" + AD_Window_ID + "|" + AD_InfoWindow_ID + "|" + AD_Process_ID + "|" + rs.getString(1);
|
||||
}else if ("I".equals(PreferenceFor)){ // preference for infoWindow
|
||||
|
|
|
@ -441,6 +441,15 @@ public class MoveClient extends SvrProcess {
|
|||
*/
|
||||
private void validateExternalTable(String tableName) {
|
||||
statusUpdate("Validating table " + tableName);
|
||||
|
||||
// if table is not present in target
|
||||
// inform blocking as it has client data
|
||||
MTable localTable = MTable.get(getCtx(), tableName);
|
||||
if (localTable == null || localTable.getAD_Table_ID() <= 0) {
|
||||
p_errorList.add("Table " + tableName + " doesn't exist");
|
||||
return;
|
||||
}
|
||||
|
||||
// if table doesn't have client data (taking into account include/exclude) in the source DB
|
||||
// add to the list of tables to ignore
|
||||
// ignore and continue with next table
|
||||
|
@ -471,14 +480,6 @@ public class MoveClient extends SvrProcess {
|
|||
}
|
||||
}
|
||||
|
||||
// if table is not present in target
|
||||
// inform blocking as it has client data
|
||||
MTable localTable = MTable.get(getCtx(), tableName);
|
||||
if (localTable == null || localTable.getAD_Table_ID() <= 0) {
|
||||
p_errorList.add("Table " + tableName + " doesn't exist");
|
||||
return;
|
||||
}
|
||||
|
||||
// for each source column
|
||||
final String sqlRemoteColumnsST = ""
|
||||
+ " SELECT AD_Column.ColumnName, AD_Column.AD_Reference_ID, AD_Column.FieldLength"
|
||||
|
|
Loading…
Reference in New Issue