Commons Codec
  1. Commons Codec
  2. CODEC-77

Base64 bug with empty input (new byte[0])

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: Nightly Builds
    • Fix Version/s: 1.4
    • Labels:
      None

      Description

      Base64.encode(new byte[0]) doesn't return an empty byte array back! It returns CRLF.

      1. codec-77.patch
        4 kB
        Julius Davies

        Activity

        Hide
        ggregory@seagullsw.com added a comment -

        Committed to SVN.

        Show
        ggregory@seagullsw.com added a comment - Committed to SVN.
        Hide
        Julius Davies added a comment -

        Note: codec-1.3 properly encodes empty-byte-array into an empty-byte-array. So this is a regression on Trunk caused by the CODEC-69 patch I submitted.

        Show
        Julius Davies added a comment - Note: codec-1.3 properly encodes empty-byte-array into an empty-byte-array. So this is a regression on Trunk caused by the CODEC-69 patch I submitted.
        Hide
        Julius Davies added a comment -

        Fix for codec-77, including JUnits.

        Also fixed two minor naming glitches in the JUnits.

        Show
        Julius Davies added a comment - Fix for codec-77, including JUnits. Also fixed two minor naming glitches in the JUnits.

          People

          • Assignee:
            Unassigned
            Reporter:
            Julius Davies
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development