From e64fdf822d55d49a906c34ed221dcd8b9fba0122 Mon Sep 17 00:00:00 2001 From: teo_sarca Date: Mon, 12 Oct 2009 07:09:31 +0000 Subject: [PATCH] BF [ 2876895 ] MiniTable.loadTable: NPE if column is null https://sourceforge.net/tracker/?func=detail&aid=2876895&group_id=176962&atid=879332 --- client/src/org/compiere/minigrid/MiniTable.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/client/src/org/compiere/minigrid/MiniTable.java b/client/src/org/compiere/minigrid/MiniTable.java index 84fbd1d9bb..1681dfb4ab 100644 --- a/client/src/org/compiere/minigrid/MiniTable.java +++ b/client/src/org/compiere/minigrid/MiniTable.java @@ -69,6 +69,9 @@ import org.compiere.util.Util; *
  • FR [ 1974299 ] Add MiniTable.getSelectedKeys method *
  • FR [ 2847295 ] MiniTable multiselection checkboxes not working * https://sourceforge.net/tracker/?func=detail&atid=879335&aid=2847295&group_id=176962 + * @author Teo Sarca, teo.sarca@gmail.com + *
  • BF [ 2876895 ] MiniTable.loadTable: NPE if column is null + * https://sourceforge.net/tracker/?func=detail&aid=2876895&group_id=176962&atid=879332 */ public class MiniTable extends CTable implements IMiniTable { @@ -490,19 +493,19 @@ public class MiniTable extends CTable implements IMiniTable { Object data = null; Class c = m_layout[col].getColClass(); - int colIndex = col + colOffset; + int colIndex = col + colOffset; if (c == IDColumn.class) data = new IDColumn(rs.getInt(colIndex)); else if (c == Boolean.class) - data = new Boolean(rs.getString(colIndex).equals("Y")); + data = new Boolean("Y".equals(rs.getString(colIndex))); else if (c == Timestamp.class) data = rs.getTimestamp(colIndex); else if (c == BigDecimal.class) data = rs.getBigDecimal(colIndex); else if (c == Double.class) - data = new Double(rs.getDouble(colIndex)); + data = rs.getDouble(colIndex); else if (c == Integer.class) - data = new Integer(rs.getInt(colIndex)); + data = rs.getInt(colIndex); else if (c == KeyNamePair.class) { String display = rs.getString(colIndex);