Export to GitHub

majortom - issue #37

IDatatypeAware and Calendar


Comment #1

Posted on Jul 28, 2010 by Happy Dog

If IGeoCoordinate and IGeoSurface is also modifiable (I don't know what the parse(String) method does exactly), I'd avoid these datatypes as well.

Or remove parse(String) from IGeoXXX and make it immutable.

Comment #2

Posted on Jul 29, 2010 by Happy Bear

IGeoXXX replaced by immutable Wgs84XXX

We decide to keep Calendar.

Comment #3

Posted on Jul 29, 2010 by Happy Dog

ACK. I still think, keeping Calendar is dangerous:

final Calendar cal = Calendar.getInstance();

occ.setValue(cal);

cal.set(Calendar.MONTH, 1);

==> The changed value is neither recognized by the occurrence nor by the literal index nor by any event listener

Comment #4

Posted on Jul 29, 2010 by Happy Bear

Thats true,

if we clone the calendar object at setValue() calls, we can avoid something like this.

We will fix that.

Comment #5

Posted on Aug 11, 2010 by Happy Bear

calendar objects are cloned if the objects are used as values of an occurrence or variant.

the getter-methods also return only a clone never the real object, any modifcations of the calendar objects keep unrecognized by the occurrence

Status: Fixed

Labels:
Type-Defect Priority-Medium