Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support decoding empty DataBuffers for Decoders that support it #29903

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Commits on Jan 30, 2023

  1. Support decoding empty DataBuffers for Decoders that support it

    Some decoders support decoding a proper payload from empty DataBuffers.
    One good example is the ProtobufDecoder.
    
    This patch adds a method canDecodeEmptyDataBuffer() to the Decoder
    interface, allowing the Decoder to signal that it is able to do that.
    
    In this case, the PayloadMethodArgumentResolver should pass the empty
    DataBuffer to the Decoder, and in all other cases behave like before.
    spheenik committed Jan 30, 2023
    Configuration menu
    Copy the full SHA
    a40b549 View commit details
    Browse the repository at this point in the history
  2. fix checkstyle complaint

    spheenik committed Jan 30, 2023
    Configuration menu
    Copy the full SHA
    dd06e77 View commit details
    Browse the repository at this point in the history

Commits on Feb 6, 2023

  1. Configuration menu
    Copy the full SHA
    c808ba7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4482ea1 View commit details
    Browse the repository at this point in the history
  3. fix checkstyle

    spheenik committed Feb 6, 2023
    Configuration menu
    Copy the full SHA
    c29c515 View commit details
    Browse the repository at this point in the history
  4. Fix failing test in spring-messaging

    The `filterNonEmptyDataBuffer()` method was added via the fix for spring-projectsgh-26344. The comment states that this fix was done because for some Decoders, an empty input may not yield a valid message. Since this is now fixed by asking the decoder whether it can decode an empty DataBuffer, the test is now able to yield a value from empty input.
    spheenik committed Feb 6, 2023
    Configuration menu
    Copy the full SHA
    a29f557 View commit details
    Browse the repository at this point in the history

Commits on Feb 8, 2023

  1. rename canDecodeEmptyDataBuffer to canDecodeEmptyMessage, to better r…

    …eflect that its only meant for complete messages
    spheenik committed Feb 8, 2023
    Configuration menu
    Copy the full SHA
    4ece71d View commit details
    Browse the repository at this point in the history
  2. improve testDecodeToMonoEmptyMessage() to use 2 empty source buffers,…

    … to better reflect the usecase
    spheenik committed Feb 8, 2023
    Configuration menu
    Copy the full SHA
    0d03e2c View commit details
    Browse the repository at this point in the history