DataUtilities.defaultValue() doesn't call AttributeType.createDefaultValue()
----------------------------------------------------------------------------
Key: GEOT-722
URL: http://jira.codehaus.org/browse/GEOT-722
Project: GeoTools
Type: Bug
Components: main
Versions: 2.2.M0
Reporter: Paolo Rizzi
Assigned to: James Macgill
Fix For: 2.2.M1
The DataUtilities.defaultValue() method doesn't call
AttributeType.createDefaultValue(),
so it ignores whatever default value was set for a particular AttributeType.
Instead it first tries creating a new instance of the Attribute's contained type
using the default constructor and then tries calling attributeType.parse(null).
I can't understand why it does this, maybe there's a rationale, but I can't
find it.
The problem is that this method ends up beeing called by
JDBCFeatureWriter.next(),
so you'll never got a working Feature from it.
You can see the bug with a not nullable Geometry Attribute,
because com.vividsolutions.jts.geom.Geometry doesn't have a default constructor.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel