Cleaning up warnings/javadocs in SimpleFeatureBuilder ... and noticed the "Deep 
copy of an existing fature" actually just makes a clone of Geometry and nothing 
else.

Do we care? I will at least document what it actually does. 
The method is only called by MemoryDataStore and a couple of test cases.

Jody

public static SimpleFeature deep(SimpleFeature original){
        ...
        SimpleFeatureBuilder builder = new 
SimpleFeatureBuilder(original.getFeatureType());
        for (Property property : original.getProperties()) {
                Object value = property.getValue();
                Object copy = value;
                if (value instanceof Geometry) {
                    Geometry geometry = (Geometry) value;
                    copy = geometry.clone();
                }
                builder.set(property.getName(), copy);
         }
         return builder.buildFeature(original.getID());
}
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to