openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pinaki Poddar (JIRA)" <>
Subject [jira] Created: (OPENJPA-1823) Is merge() seriously broken?
Date Mon, 04 Oct 2010 23:45:41 GMT
Is merge() seriously broken?

                 Key: OPENJPA-1823
             Project: OpenJPA
          Issue Type: Bug
          Components: Enhance, kernel
            Reporter: Pinaki Poddar

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)
                return Boolean.TRUE;
                return Boolean.FALSE;
        if(pcGetDetachedState() != null && pcGetDetachedState() != PersistenceCapable.DESERIALIZED)
            return Boolean.TRUE;
        if(version != 0)
            return Boolean.TRUE;
            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?

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message