Revision 47722

View differences:

trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeatureRules.java
44 44
import org.gvsig.fmap.dal.feature.FeatureStore;
45 45
import org.gvsig.json.Json;
46 46
import org.gvsig.json.JsonArrayBuilder;
47
import org.gvsig.json.JsonManager;
48 47
import org.gvsig.json.JsonObjectBuilder;
49 48
import org.gvsig.json.SupportJson;
50
import org.gvsig.json.SupportToJson;
51
import org.gvsig.tools.dispose.DisposeUtils;
52 49
import org.gvsig.tools.dynobject.exception.DynFieldValidateException;
53 50
import org.gvsig.tools.persistence.PersistentState;
54 51
import org.gvsig.tools.persistence.exception.PersistenceException;
......
116 113
        if ((check & CHECK_RULES_AT_FINISH) == CHECK_RULES_AT_FINISH) {
117 114
            FeatureStore store = ((DefaultFeature) feature).getStore();
118 115
            for (FeatureRule rule : this) {
116
                if( rule == null ) {
117
                    continue;
118
                }
119 119
                if (rule.checkAtFinishEditing()) {
120 120
                    rule.validate(feature, store);
121 121
                }
......
124 124
        if ((check & CHECK_RULES_AT_EDITING) == CHECK_RULES_AT_EDITING) {
125 125
            FeatureStore store = ((DefaultFeature) feature).getStore();
126 126
            for (FeatureRule rule : this) {
127
                if( rule == null ) {
128
                    continue;
129
                }
127 130
                if (rule.checkAtUpdate()) {
128 131
                    rule.validate(feature, store);
129 132
                }
......
210 213
        Iterator<FeatureRule> it = state.getIterator("rules");
211 214
        while (it.hasNext()) {
212 215
            FeatureRule rule = it.next();
213
            this.add(rule);
216
            if( rule!=null ) {
217
                this.add(rule);
218
            }
214 219
        }
215 220
    }
216 221

  
......
220 225
        if( items!=null ) {
221 226
            for (JsonValue item : items) {
222 227
                FeatureRule rule = (FeatureRule) Json.toObject(item);
223
                this.add(rule);
228
                if( rule != null ) {
229
                    this.add(rule);
230
                }
224 231
            }
225 232
        }
226 233
    }

Also available in: Unified diff