polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Merlin (JIRA)" <j...@apache.org>
Subject [jira] [Created] (ZEST-107) Entity SPI: JSONEntityState cloning logic is flawed
Date Mon, 27 Jul 2015 13:35:05 GMT
Paul Merlin created ZEST-107:

             Summary: Entity SPI: JSONEntityState cloning logic is flawed
                 Key: ZEST-107
                 URL: https://issues.apache.org/jira/browse/ZEST-107
             Project: Zest
          Issue Type: Bug
    Affects Versions: 2.0
            Reporter: Tibor Mlynarik
            Assignee: Paul Merlin
             Fix For: 2.1

The cloneStateIfGlobalStateLoaded() method of JSONEntityState is called before any change
is made to the entity state.

This method starts with the following check:

if( isStateNotCloned() )
// Do the clone

And the (private) isStateNotCloned() method returns:
status == EntityStatus.LOADED

IOW, the code says that it will clone state if status is loaded, but it does the opposite!

See discussion: http://s.apache.org/1QI

This message was sent by Atlassian JIRA

View raw message