Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-dev] Fix for 219097 : EclipseLink JPA needs to clone properties for immutable Maps - to avoid a rollback UnsupportedOperationException

    The following eclipslink.core change is available for review before checkin.
 
    http://bugs.eclipse.org/bugs/show_bug.cgi?id=219097
 
    The details on the fix are in the bug text, but the summary is that OC4J sets an immutable Map Collections$emptyMap() on the entityManager that causes problems when we attempt to put() property values on this map in any rollback exception handler code in UnitOfWork.
    The testcase has been reduced to a JPA SE test that causes an SQLException when a field length has been exceeded, any SQLException will do though.
 
    AbstractSession now clones all maps into a HashMap (we cannot use Object.clone()) regardless of whether the map is immutable or not to save on an instanceof check in setProperties(Map).
 
    New test case in JPATests | AllCMP3TestRunModel | FullRegressionTestSuite | advanced | org..EntityManagerJUnitTestSuite via the Testing Browser
 
    eclipselink.core.test    pass
    ecipselink.jpa.test    pass
 
    Code Reviewed by
        Gordon
 
    Note: the following bug should be fixed by this fix as well.
 
    thank you
    /michael
 

Back to the top