Some cleaning related to isEmpty

* remove duplicate ()
* remove casts no longer needed

I'm doing these last tasks around isEmpty and isNotEmpty mostly to be sure that nothing has slipped in. Despite I have been very careful, I prefer double check.

+ one typo in ofbizSelenium help (not sure this file is used yet though, seems to be missing some parts which are commented out, for now I guess)



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@885093 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jacques Le Roux
2009-11-28 14:08:16 +00:00
parent 2777b83223
commit 569a4afeea
8 changed files with 13 additions and 13 deletions
@@ -2997,7 +2997,7 @@ public class GenericDelegator implements Delegator {
if (field.getEncrypt()) {
Object obj = entity.get(field.getName());
if (obj != null) {
if (obj instanceof String && UtilValidate.isEmpty((String) obj)) {
if (obj instanceof String && UtilValidate.isEmpty(obj)) {
continue;
}
entity.dangerousSetNoCheckButFast(field, this.encryptFieldValue(entityName, obj));
@@ -3011,7 +3011,7 @@ public class GenericDelegator implements Delegator {
*/
public Object encryptFieldValue(String entityName, Object fieldValue) throws EntityCryptoException {
if (fieldValue != null) {
if (fieldValue instanceof String && UtilValidate.isEmpty((String) fieldValue)) {
if (fieldValue instanceof String && UtilValidate.isEmpty(fieldValue)) {
return fieldValue;
}
return this.crypto.encrypt(entityName, fieldValue);