|
From: Benjamin P. <bpo...@us...> - 2006-09-26 10:22:19
|
Update of /cvsroot/swixat/swixat/src/main/java/org/swixat/databinding In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv25366/src/main/java/org/swixat/databinding Modified Files: Tag: B0_5_5 JTableModel.java Log Message: add try ... catch to xpath evaluation and return null if error Index: JTableModel.java =================================================================== RCS file: /cvsroot/swixat/swixat/src/main/java/org/swixat/databinding/JTableModel.java,v retrieving revision 1.2.2.11 retrieving revision 1.2.2.12 diff -C2 -d -r1.2.2.11 -r1.2.2.12 *** JTableModel.java 20 Sep 2006 12:51:33 -0000 1.2.2.11 --- JTableModel.java 26 Sep 2006 10:22:15 -0000 1.2.2.12 *************** *** 411,415 **** jx.getVariables().declareVariable("col", new Integer(col)); ! result = XPathUtil.applyXPath(xpath, null, jx, false); } else if (o != null && o.getClass().isArray()) { // data is array of array, use 2nd array for columns --- 411,422 ---- jx.getVariables().declareVariable("col", new Integer(col)); ! try { ! result = XPathUtil.applyXPath(xpath, null, jx, false); ! } catch (Exception eee) { ! result = null; ! if (log.isWarnEnabled()) { ! log.warn("Can't evaluate xpath: " + xpath, eee); ! } ! } } else if (o != null && o.getClass().isArray()) { // data is array of array, use 2nd array for columns |