Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-19539

Fix marshalling of a map which contains a null value

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 7.10
    • Fix Version/s: 7.10-HF10, 8.3
    • Component/s: Automation

      Description

      JsonMarshalling skips null value when writing a map. This causes the following error:

      org.codehaus.jackson.JsonGenerationException: Can not write a field name, expecting a value
              at org.codehaus.jackson.impl.JsonGeneratorBase._reportError(JsonGeneratorBase.java:480)
              at org.codehaus.jackson.impl.WriterBasedGenerator.writeFieldName(WriterBasedGenerator.java:195)
              at org.nuxeo.ecm.automation.client.jaxrs.spi.JsonMarshalling.writeMap(JsonMarshalling.java:333)
              at org.nuxeo.ecm.automation.client.jaxrs.spi.JsonMarshalling.writeRequest(JsonMarshalling.java:323)
              at org.nuxeo.ecm.automation.client.jaxrs.spi.DefaultSession.execute(DefaultSession.java:83)
              at org.nuxeo.ecm.automation.client.jaxrs.spi.DefaultOperationRequest.execute(DefaultOperationRequest.java:167)
      

      The method JsonMarshalling#write should do something when obj is null

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 minute
                1m