} else { return; }
        void setProperty(Property p, DataObject data, Object value) throws Exception {            final String propName = p.getName();            OID id = data.getOID();            s_log.debug("setting property : " + data.getObjectType().getQualifiedName() + "." + data.getObjectType().getName() + "." + p.getName());// + " to value: " + value);            s_log.debug("Old value was: " + data.get(p.getName()));            final boolean valueIsNull = ( value == null || value instanceof String && ((String) value).length() == 0);            boolean savedNullInRequiredField = false;            try {                data.set( p.getName(), value );                data.save();                // This is neccessary since fail cannot be called here.                // Its exception would be caught. Need to check this                // value after the catch block                savedNullInRequiredField = ( p.isRequired() && valueIsNull );            } catch (Exception t) {                if( p.isRequired() && valueIsNull ) {                    return;                }                if( p.isNullable() && valueIsNull ) {                    String msg = "Failed to save DataObject: " +  data.getObjectType().getName();                    msg += "\nTried to update nullable property " + p.getName();                    msg += " with null value and failed!";                    msg += "\nException is: " + t.getMessage();                    s_log.debug(msg);                    throw new CheckedWrapperException(msg, t);                }                else {                    s_log.debug("Failed to set property " + p.getName());                    s_log.debug("Checking error");                    checkSetError(t, p, data, value);                    if (DbHelper.getDatabase() == DbHelper.DB_POSTGRES) {                        throw new AbortMetaTestException();                    } else {                        return;                    }                }            }            if (savedNullInRequiredField) {                String msg = "DataObject saved null value in a required Property: " + p.getName();                s_log.debug(msg);                throw new Exception(msg);            }            DataObject fromDatabase = getSession().retrieve(id);            Object newValue = fromDatabase.get(p.getName());            checkEquals( p.getName(), value, newValue );        }