details: https://code.openbravo.com/erp/devel/main/rev/fb9964930645
changeset: 19624:fb9964930645
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 0873c2b712e7 -r fb9964930645
src/org/openbravo/dal/xml/EntityResolver.java
--- a/src/org/openbravo/dal/xml/EntityResolver.java Sat Feb 09 06:37:23
2013 +0100
+++ 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