|
[
Permlink
| « Hide
]
Craig Russell added a comment - 29/Jul/06 08:02 PM
Need to resolve these issues for maintenance release 1.
This changes the test as suggested by Ilan.
I don't understand how the original test could have worked. Still looking. Thanks for the fix. I assume that the old code should work fine if the implementation returns from getGroup a shared set that is still used by the FetchPlan.
The spec is silent on whether the return can be a "live" object. I had assumed that it was not shared but copied (all other "value" objects in the specification are defined as copied). I'll raise this with the expert group.
The spec isnt totally silent (12.7.5 comment line in the code for getGroups). Erik asked the question on the mailing list on 15th Feb 2006, and a knowledgeable person replied that it is immutable, see
http://mail-archives.apache.org/mod_mbox/db-jdo-dev/200602.mbox/%3c5EC61AF4-55BA-4B9E-A74A-05ABC2DE451E@Sun.COM%3e Hi Andy,
The spec does say the returned Set is immutable but that doesn't necessarily mean that the underlying Set is immutable as well. That is, there is room for the Set to change based on the underlying groups. But I think it makes sense to return an immutable Set that will never change, even if the underlying groups changes. Understood. The original test does fail with the change to backing store copy (in JPOX CVS). Just need someone to apply the patch to tck20 ;-)
It was implicitly understood that the returned Set is immutable because the underlying Set is a reference. If the underlying set is a copy, it does not make sense to be immutable.
Anyway, I dont have any problem if it's changed to copy. In this case, making the returned set mutable is better for usability. svn commit -m "
Sending src/java/org/apache/jdo/tck/api/persistencemanager/fetchplan/FetchPlanInterface.java Transmitting file data . Committed revision 429180. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||