Uploaded image for project: 'Kuali Rice Development'
  1. Kuali Rice Development
  2. KULRICE-13138

Apply the new deep copy method to Rice objects

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.5
    • Component/s: Development
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Sprint:
      Core 2.5.0-m6 Sprint 2, Core 2.5.0-m7 Sprint 1
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Code Review Status:
      Not Required
    • Include in Release Notes?:
      Yes
    • Story Points:
      2

      Description

      New deep copy methods were created for KULRICE-13088. We have several places in our code that should attempt to use them instead.

      Any issues brought up in https://jira.kuali.org/issues/?jql=text%20~%20%22An%20attempt%20was%20made%20to%20traverse%20a%20relationship%20using%20indirection%20that%20had%20a%20null%22 that are Rice-specific should be addressed, but the classes we fixed seem to be ResponsibilityBo, ContextBo, PropositionBo, and RuleBo.

        Attachments

          Issue Links

            Activity

            Hide
            jkeller Jonathan Keller added a comment -

            Did we really mean the new deep copy or the materialize sub objects function? My work on 13088 was to materialize sub objects (presumably so they could be copied)

            I'm checking into the usage of the methods I did replace throughout the Rice code to see what I can adjust. I'm also able to update the KRAD LDA so that it will call the new code.

            Show
            jkeller Jonathan Keller added a comment - Did we really mean the new deep copy or the materialize sub objects function? My work on 13088 was to materialize sub objects (presumably so they could be copied) I'm checking into the usage of the methods I did replace throughout the Rice code to see what I can adjust. I'm also able to update the KRAD LDA so that it will call the new code.
            Hide
            jkeller Jonathan Keller added a comment -

            I'm working on replacing those methods. The replacements seem to work without introducing any problems to BO copy on KRAD and KNS screens.

            Now - there does not seem to be any use of the ObjectUtils.deepCopy() methods within non-KNS components of Rice. So, I don't see anything to change with regards to those.

            Show
            jkeller Jonathan Keller added a comment - I'm working on replacing those methods. The replacements seem to work without introducing any problems to BO copy on KRAD and KNS screens. Now - there does not seem to be any use of the ObjectUtils.deepCopy() methods within non-KNS components of Rice. So, I don't see anything to change with regards to those.
            Hide
            kbtaylor Kristina Taylor (Inactive) added a comment -

            Pretty much we need to be able to replace the hacks we put in with your new method so we don't have to keep having to patch this. It could be very well that "deep copy" is the wrong terminology.

            Show
            kbtaylor Kristina Taylor (Inactive) added a comment - Pretty much we need to be able to replace the hacks we put in with your new method so we don't have to keep having to patch this. It could be very well that "deep copy" is the wrong terminology.
            Hide
            jkeller Jonathan Keller added a comment -

            OK - found what I need to research here.

            Because of the way that JPA works - we can not use serialization as a method of duplicating our objects for copies. The code in ContextBo is using:

            org.kuali.rice.core.api.util.io.SerializationUtils.deepCopy()

            Code which needs to copy a persisted object will need to be updated to use

            DataObjectService.copyInstance()

            Though - from some discussions with Martin - there may be more we need to do in that copyInstance method to make this work correctly. (It seems that some "residue" may get left behind that we need to clean up.)

            Show
            jkeller Jonathan Keller added a comment - OK - found what I need to research here. Because of the way that JPA works - we can not use serialization as a method of duplicating our objects for copies. The code in ContextBo is using: org.kuali.rice.core.api.util.io.SerializationUtils.deepCopy() Code which needs to copy a persisted object will need to be updated to use DataObjectService.copyInstance() Though - from some discussions with Martin - there may be more we need to do in that copyInstance method to make this work correctly. (It seems that some "residue" may get left behind that we need to clean up.)

              People

              • Assignee:
                jkeller Jonathan Keller
                Reporter:
                kbtaylor Kristina Taylor (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: