Revision 44941 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/DefaultEditableFeatureAttributeDescriptor.java

View differences:

DefaultEditableFeatureAttributeDescriptor.java
489 489
        if( StringUtils.isBlank(name)) {
490 490
            throw new IllegalArgumentException("Name can't be empty");
491 491
        }
492
        switch(name.toLowerCase()) {
492
        String ss; 
493
        switch(name.trim().toLowerCase()) {
493 494
            case "isreadonly":
494 495
            case "readonly":
495 496
                this.setIsReadOnly(DataTypeUtils.toBoolean(value, false));
......
578 579
            case "relation":
579 580
                this.setRelationType(toRelation(value));
580 581
                break;
582
            case "name":
583
                this.setName(DataTypeUtils.toString(value, null));
584
                break;
585
            case "type":
586
            case "datatype":
587
                ss = DataTypeUtils.toString(value, null);
588
                if( !StringUtils.isBlank(ss) ) {
589
                    this.setDataType(ToolsLocator.getDataTypesManager().getType(ss));
590
                }
591
                break;
581 592
            default:
582 593
                throw new IllegalArgumentException("Name attribute '"+name+"' not valid.");
583 594
        }     

Also available in: Unified diff