openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pinaki Poddar (Commented) (JIRA)" <>
Subject [jira] [Commented] (OPENJPA-1707) A warning message should be logged when a down level enhanced Entity is encountered.
Date Wed, 25 Jan 2012 01:54:40 GMT


Pinaki Poddar commented on OPENJPA-1707:

> Since this field was never utilized, I took the liberty to repurpose the method. 
Such liberty is not recommended for several reasons
a) the purpose of the field is lost by your change. 
b) The purpose was non-trivial and now replaced with a rather trivial semantics. What code
reversion was used to enhance a class is not as important as to know whether the serialization
data for an enhanced entity has been modified by us which is critical information in a version
With this change one can add a new log statement in PCEnhancer and this change will start
logging warning messages for no good reason. 

If the concern is why this information is not used so far, then change that by adding some
code that validates that enhancement is compatible. 
If the concern is to carry that information on code revision then that has to be done using
a separate field, and upgrading the value of ENHANCEMENT_CONTRACT to its next integral level.
> A warning message should be logged when a down level enhanced Entity is encountered.
> ------------------------------------------------------------------------------------
>                 Key: OPENJPA-1707
>                 URL:
>             Project: OpenJPA
>          Issue Type: Improvement
>          Components: kernel
>    Affects Versions: 2.0.0, 2.1.0
>            Reporter: Rick Curtis
>            Assignee: Rick Curtis
>             Fix For: 2.1.0
> Currently when PCEnhancer is called to enhance an Entity that was previous enhanced it
will simply noop and move on. It could be smarter and use the PersistenceCapable.pcGetEnhancementContractVersion
to detect and when an Entity has been enhanced with an older version of the enhancer and log
a warning message. A similar change would also need to be made to PCClassFileTransformer.needsEnhance
to perform the same sort of logic at runtime.
> This would be particularly helpful in the case where an application was compiled/enhanced/packaged
and a bug was fixed in the enhancer but the pre-packaged app still has the bad bytecode.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message