Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[higgins-dev] ISimpleValue.getData/setData

So far, I've assumed that CP writers will treat the Object returned from and passed to ISimpleValue.getData and setData as immutable.
 
Meaning that even if a consumer called setData(someObject) and then modified the object, that it would have no effect on the simple value.  Similarly, calling someObject = getData() and then modifying someObject would have no effect on the simple value.
 
I just need to document the correct behavior.  If we document this Object as immutable, the CP will need to make use of copies for certain objects to ensure an immutable nature.  These include Date, ByteBuffer, .  I believe the following are already immutable: Boolean, BigDecimal, BigInteger, Float, Double, Long, Integer, Short, Byte, URI, String.
 
If no one disagrees, I'll document the Object as immutable in nature (enforced by the CP).
 
Jim

Back to the top