Uploaded image for project: 'JDO'
  1. JDO
  2. JDO-611

GetObjectIdForPersistentInterface - Implementation Class / PICompany / ICompany Mess

    XMLWordPrintableJSON

Details

    Description

      I have two issues with this test:

      (1)
      IMO, PICompany should be written instead of ICompany:

      (a)
      ICompany icompany = (ICompany)pm.newInstance(PICompany.class);
      instead of:
      ICompany icompany = (ICompany)pm.newInstance(ICompany.class);

      and:

      (b)
      addTearDownClass(PICompany.class);
      instead of:
      addTearDownClass(ICompany.class);

      ICompany is not persistence capable, so the implementation does not have to handle it.

      (2)
      I think that the following check is wrong:

      if (icompanyOidClass != icompany.getClass())

      icompany.getClass() => the physical internal implementation class
      icompanyOidClass => the logical interface (PICompany)

      Actually and exception should be thrown if (icompanyOidClass == icompany.getClass())

      Attachments

        Activity

          People

            mcaisse Michelle Caisse
            kirsh Ilan Kirsh
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: