You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Pinaki Poddar (JIRA)" <ji...@apache.org> on 2010/10/05 01:45:41 UTC
[jira] Created: (OPENJPA-1823) Is merge() seriously broken?
Is merge() seriously broken?
----------------------------
Key: OPENJPA-1823
URL: https://issues.apache.org/jira/browse/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)
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?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-1823) Is merge() seriously broken?
Posted by "Rick Curtis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1823?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12917982#action_12917982 ]
Rick Curtis commented on OPENJPA-1823:
--------------------------------------
Pinaki - I don't understand where you are going with this JIRA? Is there some problem that you haven't mentioned yet?
If an Entity has a version field, why would pcIsDetached() ever return null?
> Is merge() seriously broken?
> ----------------------------
>
> Key: OPENJPA-1823
> URL: https://issues.apache.org/jira/browse/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)
> 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?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-1823) Is merge() seriously broken?
Posted by "Michael Dick (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1823?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12917978#action_12917978 ]
Michael Dick commented on OPENJPA-1823:
---------------------------------------
The snippets you provided don't seem broken. Is there an else block that you're concerned about?
> Is merge() seriously broken?
> ----------------------------
>
> Key: OPENJPA-1823
> URL: https://issues.apache.org/jira/browse/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)
> 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?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (OPENJPA-1823) Is merge() seriously broken?
Posted by "Pinaki Poddar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1823?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pinaki Poddar closed OPENJPA-1823.
----------------------------------
Resolution: Invalid
My silly bad. Ignore.
> Is merge() seriously broken?
> ----------------------------
>
> Key: OPENJPA-1823
> URL: https://issues.apache.org/jira/browse/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)
> 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?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.