IDEMPIERE-738 Reduce duplicate string reported by Eclipse Memory Analyzer. Fixed NPE reported in google group.

This commit is contained in:
Heng Sin Low 2013-03-15 09:59:17 +08:00
parent 7da09afb1f
commit 0b179c8de1
1 changed files with 5 additions and 6 deletions

View File

@ -529,12 +529,11 @@ public final class Msg
DB.close(rs, pstmt); DB.close(rs, pstmt);
rs = null; pstmt = null; rs = null; pstmt = null;
} }
if (retStr != null) {
retStr = retStr.trim(); retStr = retStr == null ? "" : retStr.trim();
cache.put(key, retStr); cache.put(key, retStr);
return retStr;
}
return retStr; return retStr;
} // getElement } // getElement
/** /**