Chemistry
  1. Chemistry
  2. CMIS-470

inmemory setContentStream implementation doesn't have default value for the overwriteFlag

    Details

      Description

      running a request like
      curl --anyauth -u dummyuser:dummysecret -T NEWS 'http://localhost:8080/inmemory/atom/A1/content?id=133' should update the content stream as the overwriteFlag defaults to true see http://docs.oasis-open.org/cmis/CMIS/v1.0/os/cmis-spec-v1.0.html#_Toc243905602.

      In the current state, inmemory server even raises an uncaught NullPointerException

        Activity

        Hide
        Cédric Bosdonnat added a comment -

        The trivial patch fixing the bug

        Show
        Cédric Bosdonnat added a comment - The trivial patch fixing the bug
        Hide
        Cédric Bosdonnat added a comment -

        This is trivial patch avoiding a crash and fixing an inmemory AtomPub binding spec implementation bug.

        Show
        Cédric Bosdonnat added a comment - This is trivial patch avoiding a crash and fixing an inmemory AtomPub binding spec implementation bug.
        Hide
        Florian Müller added a comment -

        Please don't apply this patch as it affects other server implementations. Use the CmisServiceWrapper instead.

        Show
        Florian Müller added a comment - Please don't apply this patch as it affects other server implementations. Use the CmisServiceWrapper instead.
        Hide
        Jens Hübel added a comment -

        I agree Florian. I have fixed the issue inside of the InMemory implementation which was my preferred way as well. The patch by the way does not work as there is a typo using != where == was meant (just in case someone tries to use it as a hotfix). The server bindings should not touch the parameters unless absolutely required.

        Show
        Jens Hübel added a comment - I agree Florian. I have fixed the issue inside of the InMemory implementation which was my preferred way as well. The patch by the way does not work as there is a typo using != where == was meant (just in case someone tries to use it as a hotfix). The server bindings should not touch the parameters unless absolutely required.
        Hide
        Jens Hübel added a comment -

        Just noticed that the CmisServerWrapper contains the code already...
        overwriteFlag = getDefaultTrue(overwriteFlag);

        Show
        Jens Hübel added a comment - Just noticed that the CmisServerWrapper contains the code already... overwriteFlag = getDefaultTrue(overwriteFlag);

          People

          • Assignee:
            Jens Hübel
            Reporter:
            Cédric Bosdonnat
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 2m
              2m
              Remaining:
              Remaining Estimate - 2m
              2m
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development