Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DAFFODIL-2169

Add type safety to DPath variables

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.5.0
    • Clean Ups
    • None

    Description

      Currently our DPath runtime (and, I believe, main infoset) pass around values of type AnyRef, which affords almost no protection through the Scala type system.

      This was done to avoid the boxing overhead normaly associated with creating case classes. However, it should be possible to create an unboxed type that can provide some level of type safety. 

      Simmilar to our current Maybe type, can can create a new value type that wraps AnyRef. Being a value type, it will not require boxing. We can then make the main constructor hidden, and provide constructors only for those types that we want to allow as DPath variables.

      This should provide us type safty in assiging to DPath variables. Reading the values will still involve dealing with AnyRef however.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            brandon.sloane Brandon Sloane
            brandon.sloane Brandon Sloane
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 18h 40m
                18h 40m

                Issue deployment