details: https://code.openbravo.com/erp/devel/pi/rev/fe46ee66e77a
changeset: 19634:fe46ee66e77a
user: Augusto Mauch <augusto.mauch <at> openbravo.com>
date: Mon Feb 11 15:23:11 2013 +0100
summary: Fixes issue 23023: NPE no longer thrown when using REST webservices
to add rows
In the resolve function of the EntityResolver class,
OBDal.getInstance().get(entityName, id) was being executed without checking if
the id was null.
diffstat:
src/org/openbravo/dal/xml/EntityResolver.java | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (13 lines):
diff -r 14e8e1bbd3ce -r fe46ee66e77a
src/org/openbravo/dal/xml/EntityResolver.java
--- a/src/org/openbravo/dal/xml/EntityResolver.java Sun Feb 10 18:04:12
2013 +0530
+++ b/src/org/openbravo/dal/xml/EntityResolver.java Mon Feb 11 15:23:11
2013 +0100
@@ -145,7 +145,8 @@
}
result = searchInstance(entity, id);
}
- } else {
+ } else if (id != null) {
+ // Only try to fetch the object if the id is not null
result = OBDal.getInstance().get(entityName, id);
}
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits