Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-1823

Is merge() seriously broken?

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Invalid
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Enhance, kernel
    • Labels:
      None

      Description

      Does someone recently rewrite the critical method pcIsDetached() in PCEnhancer and broke it?

      This is a piece of code in isDetached(Object obj) method of BrokerImpl
      PersistenceCapable pc = ...;
      Boolean detached = pc.pcIsDetached();
      if (detached != null)
      return detached.booleanValue();

      A enhanced PersistenceCapable has the following in its pcIsDetached()
      public Boolean pcIsDetached()
      {
      if(pcStateManager != null)
      if(pcStateManager.isDetached())
      return Boolean.TRUE;
      else
      return Boolean.FALSE;
      if(pcGetDetachedState() != null && pcGetDetachedState() != PersistenceCapable.DESERIALIZED)
      return Boolean.TRUE;
      if(version != 0)
      return Boolean.TRUE;
      if(pcVersionInit)

      { return Boolean.TRUE; }

      else

      { return Boolean.FALSE; }

      }

      The method never returns null. But that is what BrokerImpl checks for.

      Does someone recently rewrite this critical method in PCEnhancer and broke it?

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ppoddar@apache.org Pinaki Poddar
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: