Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-4437

Require explicitly setting projection on RestAddressableModel subclasses

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Received (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: REST API v7
    • Labels:
      None
    • Attachments:
      0
    • Comments:
      0
    • Documentation Status:
      Needed

      Description

      In the current projections code, if, due to developer oversight, a Converter fails to set the projection on a Rest object instance, it will default to "DefaultProjection", and the one given in the url won't be respected. This can lead to wasted time looking for the cause of the problem.

      It would be safer if RestAddressableModel's constructor took a required Projection instance, instead of having a setter for the field. Then not setting it would be a compile-time issue.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            cwilper Chris Wilper
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated: