Revision 44801 trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.exportto/org.gvsig.exportto.lib/org.gvsig.exportto.lib.api/src/main/java/org/gvsig/export/spi/AbstractExportService.java

View differences:

AbstractExportService.java
232 232
            String targetAttrName = targetAttr.getName();
233 233
            //translate field
234 234
            FeatureAttributeDescriptor sourceAttr;
235
            String sourceAttrName;
235
            String sourceAttrName;            
236 236
            if (isActive) {
237 237
                sourceAttrName = exp.getSourceName(targetAttrName);
238 238
                for (ExportAttributes.ExportAttribute exportAttribute : exp) {
......
245 245
            } else {
246 246
                sourceAttrName = targetAttrName;
247 247
                sourceAttr = sourceType.getAttributeDescriptor(targetAttrName);
248
            }
248
            }            
249 249
            if (sourceAttr != null) {
250
                Object value = source.get(sourceAttrName);
250
                Object value = source.get(sourceAttrName);                
251 251
                if (value == null) {
252 252
                    if (targetAttr.allowNull()) {
253 253
                        target.set(targetAttrName, null);
......
255 255
                } else {
256 256
                    target.set(targetAttrName, value);
257 257
                }
258
            } else if (sourceAttr==null && source.hasExtraValue(sourceAttrName)) {
259
                    Object value = source.getExtraValue(sourceAttrName);
260
                    target.set(targetAttrName, value);
261
                }
258 262
            }
259 263
        }
260 264
    }
261 265

  
262
}
266

  

Also available in: Unified diff