IDEMPIERE-2640:Performance: Html/Tabular reports size could be reduced

fix: NPE report by Tomas Svikruha
This commit is contained in:
hieplq 2015-07-03 21:01:34 +07:00
parent 03f649f75e
commit 944542b61b
1 changed files with 15 additions and 4 deletions

View File

@ -1915,13 +1915,24 @@ queued-job-count = 0 (class javax.print.attribute.standard.QueuedJobCount)
CSSInfo compareObj = (CSSInfo)obj;
if (compareObj.color == null && color != null)
return compareObj (compareObj.color, color) && compareObj (compareObj.font, font);
}
/**
* compare two object equal when both is null or result of equal
* @param obj1
* @param obj2
* @return
*/
protected boolean compareObj(Object obj1, Object obj2) {
if (obj1 == null && obj2 != null)
return false;
if (compareObj.font == null && font != null)
return false;
if (obj1 == null && obj2 == null){
return true;
}
return compareObj.color.equals(color) && compareObj.font.equals(font);
return obj1.equals(obj2);
}
/**