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

Nuxeo Stream computation record flag USER2 cannot be used

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 10.2
    • Fix Version/s: 10.3
    • Component/s: Streams
    • Tags:
    • Sprint:
      nxcore 10.3.5
    • Story Points:
      1

      Description

      There is 2 user reserved flags on computation record, the flag USER2 is not properly encoded and create error on decoding.

              Record myRecord = Record.of("key", "value".getBytes(StandardCharsets.UTF_8));
              myRecord.setFlags(EnumSet.of(Record.Flag.COMMIT, Record.Flag.USER2));
      

      when this record is decoded it raises:

      [ComputationRunner]  Exception in processLoop: null
      java.lang.NullPointerException
      	at java.util.EnumSet.typeCheck(EnumSet.java:396)
      	at java.util.RegularEnumSet.add(RegularEnumSet.java:161)
      	at java.util.RegularEnumSet.add(RegularEnumSet.java:36)
      	at org.nuxeo.lib.stream.computation.Record.decodeFlags(Record.java:218)
      

      The decoding is not working properly because of bad cast between a byte and a signed short so the last flag (which is USER2) generates the above error.
      Others 7 flags works.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bdelbosc Benoit Delbosc
                Reporter:
                bdelbosc Benoit Delbosc
                Participants:
                Reviewers:
                Gethin James
              • Votes:
                0 Vote for this issue
                Watchers:
                2 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 - 2 hours
                  2h