You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-dev@db.apache.org by "Ilan Kirsh (JIRA)" <ji...@apache.org> on 2006/07/26 10:26:13 UTC

[jira] Created: (JDO-402) checkRemoveGroup - removeGroup should be before getGroups

checkRemoveGroup - removeGroup should be before getGroups
---------------------------------------------------------

                 Key: JDO-402
                 URL: http://issues.apache.org/jira/browse/JDO-402
             Project: JDO
          Issue Type: Bug
          Components: tck20
    Affects Versions: JDO 2 final
            Reporter: Ilan Kirsh


In org.apache.jdo.tck.api.persistencemanager.fetchplan.FetchPlanInterface, lines 281-282,

it probably has to be:
        fp.removeGroup("default");
        Collection groups = fp.getGroups();

Instead of:
        Collection groups = fp.getGroups();
        fp.removeGroup("default");


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (JDO-402) checkRemoveGroup - removeGroup should be before getGroups

Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JDO-402?page=all ]

Craig Russell updated JDO-402:
------------------------------

    Fix Version/s: JDO 2 maintenance release 1

Need to resolve these issues for maintenance release 1.

> checkRemoveGroup - removeGroup should be before getGroups
> ---------------------------------------------------------
>
>                 Key: JDO-402
>                 URL: http://issues.apache.org/jira/browse/JDO-402
>             Project: JDO
>          Issue Type: Bug
>          Components: tck20
>    Affects Versions: JDO 2 final
>            Reporter: Ilan Kirsh
>             Fix For: JDO 2 maintenance release 1
>
>
> In org.apache.jdo.tck.api.persistencemanager.fetchplan.FetchPlanInterface, lines 281-282,
> it probably has to be:
>         fp.removeGroup("default");
>         Collection groups = fp.getGroups();
> Instead of:
>         Collection groups = fp.getGroups();
>         fp.removeGroup("default");

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (JDO-402) checkRemoveGroup - removeGroup should be before getGroups

Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JDO-402?page=all ]

Craig Russell reassigned JDO-402:
---------------------------------

    Assignee: Craig Russell

> checkRemoveGroup - removeGroup should be before getGroups
> ---------------------------------------------------------
>
>                 Key: JDO-402
>                 URL: http://issues.apache.org/jira/browse/JDO-402
>             Project: JDO
>          Issue Type: Bug
>          Components: tck20
>    Affects Versions: JDO 2 final
>            Reporter: Ilan Kirsh
>         Assigned To: Craig Russell
>             Fix For: JDO 2 maintenance release 1
>
>         Attachments: JDO-402.patch
>
>
> In org.apache.jdo.tck.api.persistencemanager.fetchplan.FetchPlanInterface, lines 281-282,
> it probably has to be:
>         fp.removeGroup("default");
>         Collection groups = fp.getGroups();
> Instead of:
>         Collection groups = fp.getGroups();
>         fp.removeGroup("default");

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (JDO-402) checkRemoveGroup - removeGroup should be before getGroups

Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JDO-402?page=comments#action_12424397 ] 
            
Craig Russell commented on JDO-402:
-----------------------------------

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.

> checkRemoveGroup - removeGroup should be before getGroups
> ---------------------------------------------------------
>
>                 Key: JDO-402
>                 URL: http://issues.apache.org/jira/browse/JDO-402
>             Project: JDO
>          Issue Type: Bug
>          Components: tck20
>    Affects Versions: JDO 2 final
>            Reporter: Ilan Kirsh
>         Assigned To: Craig Russell
>             Fix For: JDO 2 maintenance release 1
>
>         Attachments: JDO-402.patch
>
>
> In org.apache.jdo.tck.api.persistencemanager.fetchplan.FetchPlanInterface, lines 281-282,
> it probably has to be:
>         fp.removeGroup("default");
>         Collection groups = fp.getGroups();
> Instead of:
>         Collection groups = fp.getGroups();
>         fp.removeGroup("default");

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (JDO-402) checkRemoveGroup - removeGroup should be before getGroups

Posted by "Andy Jefferson (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JDO-402?page=comments#action_12424399 ] 
            
Andy Jefferson commented on JDO-402:
------------------------------------

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

> checkRemoveGroup - removeGroup should be before getGroups
> ---------------------------------------------------------
>
>                 Key: JDO-402
>                 URL: http://issues.apache.org/jira/browse/JDO-402
>             Project: JDO
>          Issue Type: Bug
>          Components: tck20
>    Affects Versions: JDO 2 final
>            Reporter: Ilan Kirsh
>         Assigned To: Craig Russell
>             Fix For: JDO 2 maintenance release 1
>
>         Attachments: JDO-402.patch
>
>
> In org.apache.jdo.tck.api.persistencemanager.fetchplan.FetchPlanInterface, lines 281-282,
> it probably has to be:
>         fp.removeGroup("default");
>         Collection groups = fp.getGroups();
> Instead of:
>         Collection groups = fp.getGroups();
>         fp.removeGroup("default");

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (JDO-402) checkRemoveGroup - removeGroup should be before getGroups

Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JDO-402?page=comments#action_12426007 ] 
            
Craig Russell commented on JDO-402:
-----------------------------------

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.


> checkRemoveGroup - removeGroup should be before getGroups
> ---------------------------------------------------------
>
>                 Key: JDO-402
>                 URL: http://issues.apache.org/jira/browse/JDO-402
>             Project: JDO
>          Issue Type: Bug
>          Components: tck20
>    Affects Versions: JDO 2 final
>            Reporter: Ilan Kirsh
>         Assigned To: Craig Russell
>             Fix For: JDO 2 maintenance release 1
>
>         Attachments: JDO-402.patch
>
>
> In org.apache.jdo.tck.api.persistencemanager.fetchplan.FetchPlanInterface, lines 281-282,
> it probably has to be:
>         fp.removeGroup("default");
>         Collection groups = fp.getGroups();
> Instead of:
>         Collection groups = fp.getGroups();
>         fp.removeGroup("default");

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (JDO-402) checkRemoveGroup - removeGroup should be before getGroups

Posted by "Andy Jefferson (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JDO-402?page=comments#action_12426035 ] 
            
Andy Jefferson commented on JDO-402:
------------------------------------

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 ;-)

> checkRemoveGroup - removeGroup should be before getGroups
> ---------------------------------------------------------
>
>                 Key: JDO-402
>                 URL: http://issues.apache.org/jira/browse/JDO-402
>             Project: JDO
>          Issue Type: Bug
>          Components: tck20
>    Affects Versions: JDO 2 final
>            Reporter: Ilan Kirsh
>         Assigned To: Craig Russell
>             Fix For: JDO 2 maintenance release 1
>
>         Attachments: JDO-402.patch
>
>
> In org.apache.jdo.tck.api.persistencemanager.fetchplan.FetchPlanInterface, lines 281-282,
> it probably has to be:
>         fp.removeGroup("default");
>         Collection groups = fp.getGroups();
> Instead of:
>         Collection groups = fp.getGroups();
>         fp.removeGroup("default");

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (JDO-402) checkRemoveGroup - removeGroup should be before getGroups

Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JDO-402?page=all ]

Craig Russell resolved JDO-402.
-------------------------------

    Resolution: Fixed

svn commit -m "JDO-402 Change order of removeGroups and getGroups" src/java/org/apache/jdo/tck/api/persistencemanager/fetchplan/FetchPlanInterface.java
Sending        src/java/org/apache/jdo/tck/api/persistencemanager/fetchplan/FetchPlanInterface.java
Transmitting file data .
Committed revision 429180.


> checkRemoveGroup - removeGroup should be before getGroups
> ---------------------------------------------------------
>
>                 Key: JDO-402
>                 URL: http://issues.apache.org/jira/browse/JDO-402
>             Project: JDO
>          Issue Type: Bug
>          Components: tck20
>    Affects Versions: JDO 2 final
>            Reporter: Ilan Kirsh
>         Assigned To: Craig Russell
>             Fix For: JDO 2 maintenance release 1
>
>         Attachments: JDO-402.patch
>
>
> In org.apache.jdo.tck.api.persistencemanager.fetchplan.FetchPlanInterface, lines 281-282,
> it probably has to be:
>         fp.removeGroup("default");
>         Collection groups = fp.getGroups();
> Instead of:
>         Collection groups = fp.getGroups();
>         fp.removeGroup("default");

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (JDO-402) checkRemoveGroup - removeGroup should be before getGroups

Posted by "Erik Bengtson (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JDO-402?page=comments#action_12426048 ] 
            
Erik Bengtson commented on JDO-402:
-----------------------------------

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.

> checkRemoveGroup - removeGroup should be before getGroups
> ---------------------------------------------------------
>
>                 Key: JDO-402
>                 URL: http://issues.apache.org/jira/browse/JDO-402
>             Project: JDO
>          Issue Type: Bug
>          Components: tck20
>    Affects Versions: JDO 2 final
>            Reporter: Ilan Kirsh
>         Assigned To: Craig Russell
>             Fix For: JDO 2 maintenance release 1
>
>         Attachments: JDO-402.patch
>
>
> In org.apache.jdo.tck.api.persistencemanager.fetchplan.FetchPlanInterface, lines 281-282,
> it probably has to be:
>         fp.removeGroup("default");
>         Collection groups = fp.getGroups();
> Instead of:
>         Collection groups = fp.getGroups();
>         fp.removeGroup("default");

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (JDO-402) checkRemoveGroup - removeGroup should be before getGroups

Posted by "Ilan Kirsh (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JDO-402?page=comments#action_12424341 ] 
            
Ilan Kirsh commented on JDO-402:
--------------------------------

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.

> checkRemoveGroup - removeGroup should be before getGroups
> ---------------------------------------------------------
>
>                 Key: JDO-402
>                 URL: http://issues.apache.org/jira/browse/JDO-402
>             Project: JDO
>          Issue Type: Bug
>          Components: tck20
>    Affects Versions: JDO 2 final
>            Reporter: Ilan Kirsh
>         Assigned To: Craig Russell
>             Fix For: JDO 2 maintenance release 1
>
>         Attachments: JDO-402.patch
>
>
> In org.apache.jdo.tck.api.persistencemanager.fetchplan.FetchPlanInterface, lines 281-282,
> it probably has to be:
>         fp.removeGroup("default");
>         Collection groups = fp.getGroups();
> Instead of:
>         Collection groups = fp.getGroups();
>         fp.removeGroup("default");

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (JDO-402) checkRemoveGroup - removeGroup should be before getGroups

Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JDO-402?page=all ]

Craig Russell updated JDO-402:
------------------------------

    Attachment: JDO-402.patch

This changes the test as suggested by Ilan.

I don't understand how the original test could have worked. Still looking.

> checkRemoveGroup - removeGroup should be before getGroups
> ---------------------------------------------------------
>
>                 Key: JDO-402
>                 URL: http://issues.apache.org/jira/browse/JDO-402
>             Project: JDO
>          Issue Type: Bug
>          Components: tck20
>    Affects Versions: JDO 2 final
>            Reporter: Ilan Kirsh
>             Fix For: JDO 2 maintenance release 1
>
>         Attachments: JDO-402.patch
>
>
> In org.apache.jdo.tck.api.persistencemanager.fetchplan.FetchPlanInterface, lines 281-282,
> it probably has to be:
>         fp.removeGroup("default");
>         Collection groups = fp.getGroups();
> Instead of:
>         Collection groups = fp.getGroups();
>         fp.removeGroup("default");

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira