SmartClient Version: SC_SNAPSHOT-2011-04-14/PowerEdition Deployment (built 2011-04-14)
With no other changes to our code I'm getting this error after upgrading to the latest nightly build.
The line of code in our server side method that is getting the error is this.
The request being sent by the client looks like this.
I can work around it by changing the code to this.
But you may want to fix the getFieldValue() method to handle nulls like it used to so others can avoid this regression.
With no other changes to our code I'm getting this error after upgrading to the latest nightly build.
Code:
=== 2011-04-14 18:39:38,694 [0-17] WARN RequestContext - dsRequest.execute() failed: java.lang.NullPointerException at com.isomorphic.criteria.AdvancedCriteria.getFieldValue(AdvancedCriteria.java:82) at com.isomorphic.criteria.AdvancedCriteria.getFieldValue(AdvancedCriteria.java:68) at com.isomorphic.datasource.DSRequest.getCriteriaValue(DSRequest.java:1214) at com.isomorphic.datasource.DSRequest.getFieldValue(DSRequest.java:1208) at com.islandpacific.gui.server.customDataSource.PoItemDS.setDefaultsForExistingStyle(PoItemDS.java:2301) at com.islandpacific.gui.server.customDataSource.PoItemDS.getDefaults(PoItemDS.java:1664) at com.islandpacific.gui.server.customDataSource.PoItemDS.execute(PoItemDS.java:443) at com.isomorphic.application.AppBase.executeDefaultDSOperation(AppBase.java:721) at com.isomorphic.application.AppBase.executeAppOperation(AppBase.java:658) at com.isomorphic.application.AppBase.execute(AppBase.java:491) at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:1492)
Code:
String poCurrency = req.getFieldValue(HCUR)==null? "" : req.getFieldValue(HCUR).toString().trim();
Code:
{ "dataSource":"PoItem", "operationType":"custom", "operationId":"custom_PoItem_member(F927)getDefaults", "data":{ "IONO":"TEST280", "IFGP":"927", "ItemNumber":"0280-00280-0155", "IPPK":"N", "HCUR":"", "HODI":"2011-04-14T05:00:00" }, "willHandleError":true, "showPrompt":true, "oldValues":{ "IONO":"TEST280", "IFGP":"927", "ItemNumber":"0280-00280-0155", "IPPK":"N", "HCUR":"", "HODI":"2011-04-14T05:00:00" }, "requestId":"PoItem$627132" }
Code:
String poCurrency = req.getValues().get(HCUR)==null? "" : req.getFieldValue(HCUR).toString().trim();
Comment