bug 13860: add sanity check to ApiResponseSerializer when serializing XML response. Reviewed-By: Anthony

This commit is contained in:
Kelven Yang 2012-02-27 16:06:06 -08:00
parent 0276217c5e
commit 7eded374b7

View File

@ -221,7 +221,11 @@ public class ApiResponseSerializer {
String id = (idProxy.getValue() != null ? String.valueOf(idProxy.getValue()) : "");
if(!id.isEmpty()) {
IdentityDao identityDao = new IdentityDaoImpl();
id = identityDao.getIdentityUuid(idProxy.getTableName(), id);
if(idProxy.getTableName() != null) {
id = identityDao.getIdentityUuid(idProxy.getTableName(), id);
} else {
s_logger.warn("IdentityProxy sanity check issue, invalid IdentityProxy table name found in class: " + obj.getClass().getName());
}
}
if(id != null && !id.isEmpty())
sb.append("<" + serializedName.value() + ">" + id + "</" + serializedName.value() + ">");